diff --git a/.gradle/8.8/executionHistory/executionHistory.bin b/.gradle/8.8/executionHistory/executionHistory.bin index 1b66319..618ba4c 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.bin and b/.gradle/8.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index 6012c51..533df65 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.lock and b/.gradle/8.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.8/fileHashes/fileHashes.bin b/.gradle/8.8/fileHashes/fileHashes.bin index 8e6ac1e..7d9a4fb 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.bin and b/.gradle/8.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index ffd54fd..027a888 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.lock and b/.gradle/8.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.8/fileHashes/resourceHashesCache.bin b/.gradle/8.8/fileHashes/resourceHashesCache.bin index 40450fb..c0d1639 100644 Binary files a/.gradle/8.8/fileHashes/resourceHashesCache.bin and b/.gradle/8.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index b7f539d..dc8f676 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$1.class b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$1.class index d1bf742..1a750e9 100644 Binary files a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$1.class and b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$1.class differ diff --git a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$2.class b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$2.class index 050bfc9..7719ed0 100644 Binary files a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$2.class and b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$2.class differ diff --git a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$3.class b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$3.class index 09feac4..dc66162 100644 Binary files a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$3.class and b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield$3.class differ diff --git a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield.class b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield.class index 2ca762b..15c7f69 100644 Binary files a/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield.class and b/build/classes/java/main/CoswayUtil/CoswayUtil$AnchorShield.class differ diff --git a/build/libs/CoswayUtil-1.7-BETA.jar b/build/libs/CoswayUtil-1.7-BETA.jar index 718c9dd..fd143e8 100644 Binary files a/build/libs/CoswayUtil-1.7-BETA.jar and b/build/libs/CoswayUtil-1.7-BETA.jar differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId0 new file mode 100644 index 0000000..fc79f98 Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId0 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId5 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId5 new file mode 100644 index 0000000..1a750e9 Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId5 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId2 new file mode 100644 index 0000000..7719ed0 Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId2 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$3.class.uniqueId3 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$3.class.uniqueId3 new file mode 100644 index 0000000..dc66162 Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$3.class.uniqueId3 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId4 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId4 index 2ca762b..fb34cf9 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId4 and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId4 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId1 new file mode 100644 index 0000000..d9c9e5c Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId1 differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index 9b900a3..acbd9dd 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/main/java/CoswayUtil/CoswayUtil.java b/src/main/java/CoswayUtil/CoswayUtil.java index 02c45be..6708389 100644 --- a/src/main/java/CoswayUtil/CoswayUtil.java +++ b/src/main/java/CoswayUtil/CoswayUtil.java @@ -125,13 +125,18 @@ public final class CoswayUtil extends JavaPlugin { public class AnchorShield implements Listener { private final Map activeAnchors = new HashMap<>(); private final int RING_RADIUS = 25; - private final int FUEL_DECREASE_TIME = 1 * 60 * 20; // 5 minutes in ticks - + private final int FUEL_DECREASE_TIME = 5 * 60 * 20; // 5 minutes in ticks + boolean debug = false; + public void debugMessage(String msg) { + if(debug) { + Bukkit.broadcastMessage(ColorKey("[&6DEBUG&r] &c" + msg)); + } + } public void clearActiveAnchors() { for (ArmorStand marker : activeAnchors.values()) { if (marker != null && !marker.isDead()) { marker.remove(); // Remove the ArmorStand from the world - serverMessage("removed marker"); + debugMessage("removed marker"); } } activeAnchors.clear(); // Clear the HashMap @@ -178,7 +183,7 @@ public final class CoswayUtil extends JavaPlugin { marker.setInvisible(true); marker.setInvulnerable(true); marker.setMarker(true); - serverMessage("Anchor shield created"); + debugMessage("Anchor shield created"); marker.getWorld().playEffect(marker.getLocation().subtract(0,2,0),Effect.TRIAL_SPAWNER_BECOME_OMINOUS,1); marker.getWorld().playEffect(marker.getLocation().subtract(0,2,0),Effect.SMASH_ATTACK,1); marker.getWorld().playSound(marker.getLocation(),Sound.BLOCK_END_PORTAL_SPAWN,100,0); @@ -192,9 +197,9 @@ public final class CoswayUtil extends JavaPlugin { public void run() { if (!activeAnchors.containsKey(loc)) { cancel(); - serverMessage("anchors active: " + activeAnchors.toString()); - serverMessage("active loc: "+loc); - serverMessage("cancel runnable initiated 1"); + debugMessage("anchors active: " + activeAnchors.toString()); + debugMessage("active loc: "+loc); + debugMessage("cancel runnable initiated 1"); return; } createParticleRing(loc); @@ -232,19 +237,19 @@ public final class CoswayUtil extends JavaPlugin { @Override public void run() { if (!activeAnchors.containsKey(loc)) { - serverMessage("anchor mapping did not match, removed anchor: "+loc); + debugMessage("anchor mapping did not match, removed anchor: "+loc); cancel(); - serverMessage("cancel runnable initiated 2"); + debugMessage("cancel runnable initiated 2"); return; } Block block = loc.clone().subtract(0,2,0).getBlock(); RespawnAnchor anchorData = (RespawnAnchor) block.getBlockData(); if (block.getType() != Material.RESPAWN_ANCHOR) { - serverMessage(String.valueOf(block.getType())); + debugMessage(String.valueOf(block.getType())); removeMarker(loc); cancel(); - serverMessage("cancel runnable initiated 3"); + debugMessage("cancel runnable initiated 3"); return; } @@ -255,12 +260,14 @@ public final class CoswayUtil extends JavaPlugin { block.setBlockData(anchorData); // Apply the new data loc.getBlock().getWorld().playSound(loc,Sound.BLOCK_BEACON_DEACTIVATE,10,0); loc.getBlock().getWorld().playEffect(loc,Effect.TRIAL_SPAWNER_DETECT_PLAYER,1); - serverMessage("depleted anchor charge"); + debugMessage("depleted anchor charge"); } else { removeMarker(loc); - serverMessage("removed anchor shield for no fuel"); + debugMessage("removed anchor shield for no fuel"); + loc.getBlock().getWorld().playSound(loc,Sound.ITEM_TOTEM_USE,10,0); + loc.getBlock().getWorld().playEffect(loc,Effect.ENDER_DRAGON_DEATH,1); cancel(); - serverMessage("cancel runnable initiated 4"); + debugMessage("cancel runnable initiated 4"); } } }.runTaskTimer(CoswayUtil.this, FUEL_DECREASE_TIME, FUEL_DECREASE_TIME); @@ -270,7 +277,7 @@ public final class CoswayUtil extends JavaPlugin { if (activeAnchors.containsKey(loc)) { activeAnchors.get(loc).remove(); activeAnchors.remove(loc); - serverMessage("force removed shield mapping"); + debugMessage("force removed shield mapping"); } } @@ -294,7 +301,7 @@ public final class CoswayUtil extends JavaPlugin { public void onBlockPlace(BlockPlaceEvent event) { Location loc = event.getBlockPlaced().getLocation(); if (isMultiBlock(loc)) { - serverMessage("Multiblock made"); + debugMessage("Multiblock made"); manageAnchor(loc); // Start managing the anchor once the multi-block structure is assembled } }