Git Product home page Git Product logo

dynamiclights's Introduction

🌐Socials

Discord xCykrix LinkedIn Reddit Twitch Twitter

📊Statistics



🏆Trophies

✍️Random Dev Quote


💰You can help me by Donating

PayPal

dynamiclights's People

Contributors

xcykrix avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

alairack

dynamiclights's Issues

[FEAT] Add a command to bind light sources to Held Items and Worn Items

Describe the Request: Add a command to add light sources to held items or armor/worn items.

Information:

  1. How would you like to see this implemented? Adding /dl bind and /dl unbind to add or remove lights from specific items.
  2. How do you feel this will benefit the project? The advantage of this is that the light block can be used in a wider range. Players can make the wand glow, wear a luminous helmet, and many more uses.
  3. Is there any existing functionality that may need changed to support this? The lighting engine will need to support held or worn item checking and nbt tags being added or removed.
  4. Will this functionality replace or otherwise deprecate existing
    functionality? No.

Expected Behavior: /dl bind <level> will create a light source when the currently held item is held or worn. /dl unbind will remove the source from the item.

Additional Context: https://www.spigotmc.org/threads/dynamiclights.609082/#post-4663996

[BUG] Race condition when creating a folder vs writing to it by adding a file.

Hi, I like your plugin idea and tried downloading it. The console gave me these two errors when I tried starting it back up. Thought you'd want to know

[Server] [ERROR] Error occurred while enabling DynamicLights v1.0.0-SNAPSHOT (Is it up to date?)
24.06 11:11:59 [Server] [INFO] java.lang.IllegalArgumentException: Directory does not exist: nio:plugins/DynamicLights [1.4.186/0]
24.06 11:11:59 [Server] [INFO] at com.shaded._100.org.h2.mvstore.DataUtils.newIllegalArgumentException(DataUtils.java:736) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at com.shaded._100.org.h2.mvstore.FileStore.open(FileStore.java:143) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at com.shaded._100.org.h2.mvstore.MVStore.(MVStore.java:340) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at com.shaded._100.org.h2.mvstore.MVStore$Builder.open(MVStore.java:2785) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at com.github.xcykrix.plugincommon.api.H2MVStoreAPI.initialize(H2MVStoreAPI.java:19) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at com.github.xcykrix.plugincommon.PluginCommon.onEnable(PluginCommon.java:28) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:562) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at java.lang.Thread.run(Thread.java:833) ~[?:?]
24.06 11:11:59 [Server] [INFO] [DynamicLights] Disabling DynamicLights v1.0.0-SNAPSHOT
24.06 11:11:59 [Server] [ERROR] Error occurred (in the plugin loader) while disabling DynamicLights v1.0.0-SNAPSHOT (Is it up to date?)
24.06 11:11:59 [Server] [INFO] java.lang.NullPointerException: Cannot invoke "com.shaded._100.org.h2.mvstore.MVStore.close()" because "this.store" is null
24.06 11:11:59 [Server] [INFO] at com.github.xcykrix.plugincommon.api.H2MVStoreAPI.shutdown(H2MVStoreAPI.java:24) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at com.github.xcykrix.plugincommon.PluginCommon.onDisable(PluginCommon.java:54) ~[DynamicLights-1.0.0-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:283) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:224) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:537) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:193) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
24.06 11:11:59 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:562) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:636) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:435) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-"837cc25"]
24.06 11:11:59 [Server] [INFO] at java.lang.Thread.run(Thread.java:833) ~[?:?]

[FEAT] Add toggle and reload command.

Hi,

The DynamicLights plugin is great, could you add these commands?
1- /dynamiclight reload: to reload the configuration and avoid restarting the server.
2- /dynamiclight toggle: those who do not want dynamiclight

I await your response, thank you

[BUG] Cross-dimensional World Errors

Caused by: Unable to calculate distance between worlds.
Fixed by: Checking world is equal prior to distance culling check.

Fix:

if (lightLevel > 0 && differentLocations(lastLocation, nextLocation)) {
    if (player.getWorld().getName().equals(targetPlayer.getWorld().getName())) {
        if (player.getLocation().distance(targetPlayer.getLocation()) <= this.distance) {
            this.addLight(targetPlayer, nextLocation, lightLevel);
            this.setLastLocation(locationId, nextLocation);
        }
    }
}

[BUG] Concurrent Modification on Disable

Issue: Shutdown logic is concurrently reading and writing to LightManager#tasks.
Fix: Add synchronization check and separate read/write/clear operations.

[03:57:01] [Server thread/ERROR]: Error occurred (in the plugin loader) while disabling DynamicLights v1.0.2-SNAPSHOT (Is it up to date?)
java.util.ConcurrentModificationException: null
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1597) ~[?:?]
	at java.util.HashMap$KeyIterator.next(HashMap.java:1620) ~[?:?]
	at com.github.xcykrix.dynamiclights.util.LightManager.shutdown(LightManager.java:44) ~[DynamicLights-1.0.2-SNAPSHOT.jar:?]
	at com.github.xcykrix.dynamiclights.DynamicLights.shutdown(DynamicLights.java:35) ~[DynamicLights-1.0.2-SNAPSHOT.jar:?]
	at com.github.xcykrix.plugincommon.PluginCommon.onDisable(PluginCommon.java:56) ~[DynamicLights-1.0.2-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:283) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:224) ~[paper-1.20.1.jar:git-Paper-43]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugins(PaperPluginInstanceManager.java:148) ~[paper-1.20.1.jar:git-Paper-43]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugins(PaperPluginManagerImpl.java:92) ~[paper-1.20.1.jar:git-Paper-43]
	at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:528) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R1.CraftServer.disablePlugins(CraftServer.java:567) ~[paper-1.20.1.jar:git-Paper-43]
	at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:943) ~[paper-1.20.1.jar:git-Paper-43]
	at net.minecraft.server.dedicated.DedicatedServer.stopServer(DedicatedServer.java:806) ~[paper-1.20.1.jar:git-Paper-43]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1210) ~[paper-1.20.1.jar:git-Paper-43]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-43]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.