From cda28be3e3daee384fb743eaabd28f404bac81cc Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 23 Nov 2016 17:08:46 +0100 Subject: [PATCH] Set ignoreCancelled flag to chest protection events --- .../shopchest/listeners/ChestProtectListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java b/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java index 2b3e42b..d5d0b4d 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/ChestProtectListener.java @@ -44,7 +44,7 @@ public class ChestProtectListener implements Listener { this.worldGuard = worldGuard; } - @EventHandler + @EventHandler(ignoreCancelled = true) public void onBlockBreak(BlockBreakEvent e) { final Block b = e.getBlock(); @@ -94,7 +94,7 @@ public class ChestProtectListener implements Listener { } } - @EventHandler + @EventHandler(ignoreCancelled = true) public void onEntityExplode(EntityExplodeEvent e) { if (plugin.getShopChestConfig().explosion_protection) { ArrayList bl = new ArrayList<>(e.blockList()); @@ -106,7 +106,7 @@ public class ChestProtectListener implements Listener { } } - @EventHandler + @EventHandler(ignoreCancelled = true) public void onBlockPlace(BlockPlaceEvent e) { Player p = e.getPlayer(); Block b = e.getBlockPlaced(); @@ -174,7 +174,7 @@ public class ChestProtectListener implements Listener { } } - @EventHandler(priority = EventPriority.HIGH) + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onItemMove(InventoryMoveItemEvent e) { if (plugin.getShopChestConfig().hopper_protection) { if ((e.getSource().getType().equals(InventoryType.CHEST)) && (!e.getInitiator().getType().equals(InventoryType.PLAYER))) {