diff options
-rw-r--r-- | src/main/java/net/minecraft/server/BlockPressurePlate.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java index 85f5e00d..fc8a940f 100644 --- a/src/main/java/net/minecraft/server/BlockPressurePlate.java +++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java @@ -114,12 +114,14 @@ public class BlockPressurePlate extends Block { } // CraftBukkit start - CraftWorld craftWorld = ((WorldServer) world).getWorld(); - CraftServer server = ((WorldServer) world).getServer(); - CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k); - BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0); - server.getPluginManager().callEvent(eventRedstone); - flag1 = eventRedstone.getNewCurrent() > 0; + if (flag != flag1) { + CraftWorld craftWorld = ((WorldServer) world).getWorld(); + CraftServer server = ((WorldServer) world).getServer(); + CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k); + BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0); + server.getPluginManager().callEvent(eventRedstone); + flag1 = eventRedstone.getNewCurrent() > 0; + } // CraftBukkit end if (flag1 && !flag) { |