From 4500c4d407c170102adc44170aa6e6cce8305058 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Mon, 12 Nov 2012 14:58:32 -0800 Subject: [PATCH] Attempting to fix dupe bug with certain plugins and Super Breaker. --- .../java/com/gmail/nossr50/listeners/BlockListener.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 21b9c3a2e..e8039edc5 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -294,6 +294,14 @@ public class BlockListener implements Listener { Block block = event.getBlock(); Material material = block.getType(); + FakeBlockBreakEvent fakeEvent = new FakeBlockBreakEvent(block, player); + mcMMO.p.getServer().getPluginManager().callEvent(fakeEvent); + + if(fakeEvent.isCancelled()) + return; + else + fakeEvent.setCancelled(true); + Config configInstance = Config.getInstance(); Permissions permInstance = Permissions.getInstance();