From dd7f1bcf253c77d95567f20361102a12b2353bfe Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 10 Jun 2012 19:40:09 +0100 Subject: Missing event aborts in sign code. --- .../src/com/earth2me/essentials/signs/SignBlockListener.java | 10 ++++++++++ .../src/com/earth2me/essentials/signs/SignEntityListener.java | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java index ccd40b214..c159510c7 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java @@ -199,6 +199,11 @@ public class SignBlockListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onBlockPistonExtend(final BlockPistonExtendEvent event) { + if (ess.getSettings().areSignsDisabled()) + { + return; + } + for (Block block : event.getBlocks()) { if (((block.getTypeId() == WALL_SIGN @@ -224,6 +229,11 @@ public class SignBlockListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onBlockPistonRetract(final BlockPistonRetractEvent event) { + if (ess.getSettings().areSignsDisabled()) + { + return; + } + if (event.isSticky()) { final Block block = event.getBlock(); diff --git a/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java b/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java index 5a6ee177d..edc5b856d 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignEntityListener.java @@ -22,6 +22,11 @@ public class SignEntityListener implements Listener @EventHandler(priority = EventPriority.LOW) public void onEntityExplode(final EntityExplodeEvent event) { + if (ess.getSettings().areSignsDisabled()) + { + return; + } + for (Block block : event.blockList()) { if (((block.getTypeId() == Material.WALL_SIGN.getId() -- cgit v1.2.3