From d955feef61e4465c8e2541cf1d8f457c121e127c Mon Sep 17 00:00:00 2001 From: bm01 Date: Sun, 27 May 2012 10:34:04 +0200 Subject: [PATCH] Fixed piston tracking --- .../com/gmail/nossr50/listeners/BlockListener.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 97a3e9d47..5d2f449d1 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -37,7 +37,6 @@ import org.bukkit.event.block.BlockPistonExtendEvent; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; -import org.bukkit.metadata.FixedMetadataValue; import org.getspout.spoutapi.sound.SoundEffect; @@ -59,17 +58,11 @@ public class BlockListener implements Listener { BlockFace direction = event.getDirection(); for (Block b : blocks) { - if (mcMMO.placeStore.isTrue(b)) { - b.getRelative(direction).setMetadata("pistonTrack", new FixedMetadataValue(plugin, true)); - mcMMO.placeStore.setFalse(b); - } + mcMMO.placeStore.setFalse(b); } for (Block b : blocks) { - if (b.getRelative(direction).hasMetadata("pistonTrack")) { - mcMMO.placeStore.setTrue(b.getRelative(direction)); - b.getRelative(direction).removeMetadata("pistonTrack", plugin); - } + mcMMO.placeStore.setTrue(b.getRelative(direction)); } }