From 13aa735656ddaecc586017156068de09244d0c01 Mon Sep 17 00:00:00 2001 From: Arekhimself Date: Sun, 27 Jul 2025 12:07:35 +0200 Subject: [PATCH 1/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 95b85a0..f02e97e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +(All credits to https://github.com/stdNullPtr/TorchLight-SpigotMC) + # TorchLight - Offhand Torch Light Plugin **Minecraft API:** 1.19 From f7ca7768909d30cab8c2c84aa1c11239b1153404 Mon Sep 17 00:00:00 2001 From: Arekhimself Date: Sun, 27 Jul 2025 12:07:51 +0200 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f02e97e..e0d25b1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -(All credits to https://github.com/stdNullPtr/TorchLight-SpigotMC) +#(All credits to https://github.com/stdNullPtr/TorchLight-SpigotMC) # TorchLight - Offhand Torch Light Plugin From a06be4c2b10a59fb844a14de419b9922fd7fbe0e Mon Sep 17 00:00:00 2001 From: Arekhimself Date: Sun, 27 Jul 2025 12:08:01 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0d25b1..dca9104 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#(All credits to https://github.com/stdNullPtr/TorchLight-SpigotMC) +# (All credits to https://github.com/stdNullPtr/TorchLight-SpigotMC) # TorchLight - Offhand Torch Light Plugin From ac24c69c8c1d53462261f09e2b7521d55a303b5b Mon Sep 17 00:00:00 2001 From: Arekhimself Date: Sun, 27 Jul 2025 12:09:16 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dca9104..838b5f8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# (All credits to https://github.com/stdNullPtr/TorchLight-SpigotMC) +# (All credits to [stdNullPtr/TorchLight-SpigotMC](https://github.com/stdNullPtr/TorchLight-SpigotMC)) # TorchLight - Offhand Torch Light Plugin From e818ce65ce079f1c285a5e234c9ae94d611a8e6b Mon Sep 17 00:00:00 2001 From: Arekhimself Date: Sun, 27 Jul 2025 19:04:18 +0200 Subject: [PATCH 5/5] 1.0.1 --- .../stdnullptr/listener/PlayerActivityEventListener.java | 9 +++++++++ src/main/resources/plugin.yml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/src/main/java/com/stdnullptr/listener/PlayerActivityEventListener.java b/src/main/java/com/stdnullptr/listener/PlayerActivityEventListener.java index e0bdc58..48f4314 100644 --- a/src/main/java/com/stdnullptr/listener/PlayerActivityEventListener.java +++ b/src/main/java/com/stdnullptr/listener/PlayerActivityEventListener.java @@ -36,6 +36,11 @@ public PlayerActivityEventListener(final PluginMain plugin) { public void onPlayerMove(final PlayerMoveEvent event) { final Player player = event.getPlayer(); final UUID playerId = player.getUniqueId(); + + // Skip if off permission + if(player.hasPermission("torchlight.off") == true) { + return; + } // Skip if moved too recently final long currentTime = System.currentTimeMillis(); @@ -85,6 +90,10 @@ public void onPlayerMove(final PlayerMoveEvent event) { // Schedule task to revert the block to its original state Bukkit.getScheduler().runTaskLater(plugin, () -> { + // Skip if permanent permission + if(player.hasPermission("torchlight.permanent")) { + return; + } if (blockAtPlayerLocation.getType() == Material.LIGHT && playerLightLocations.containsKey(playerId) && playerLightLocations.get(playerId).equals(blockLocationAtPlayer) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index c0e35f3..328e505 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -11,3 +11,9 @@ permissions: torchlight.toggle: description: Allows toggling the offhand torch lighting feature. default: op + torchlight.off: + description: Disable light for the player. + default: false + torchlight.permanent: + description: offhand torch never light off. + default: false \ No newline at end of file