diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-10-01 17:51:56 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-10-01 17:51:56 +0100 |
commit | cd0fde05b7a8322331b9bc14ae07afeee0aa497b (patch) | |
tree | 39445a34d73c670e99c6e5ad0aa5b1365a578c21 /EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java | |
parent | 778f5649c8c0b3be9cc379f61c0a767959ebdbcd (diff) | |
parent | 8cf2ce7b73829a3496397d2a4405a0618bed5798 (diff) | |
download | Essentials-cd0fde05b7a8322331b9bc14ae07afeee0aa497b.tar Essentials-cd0fde05b7a8322331b9bc14ae07afeee0aa497b.tar.gz Essentials-cd0fde05b7a8322331b9bc14ae07afeee0aa497b.tar.lz Essentials-cd0fde05b7a8322331b9bc14ae07afeee0aa497b.tar.xz Essentials-cd0fde05b7a8322331b9bc14ae07afeee0aa497b.zip |
Merge remote-tracking branch 'remotes/origin/2.9' into groupmanager
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java index bd760b0ec..1791a9c5b 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java @@ -25,14 +25,9 @@ public class EssentialsProtectBlockListener implements Listener this.ess = prot.getEssentialsConnect().getEssentials(); } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockPlace(final BlockPlaceEvent event) { - if (event.isCancelled()) - { - return; - } - final User user = ess.getUser(event.getPlayer()); final Block blockPlaced = event.getBlockPlaced(); @@ -79,13 +74,9 @@ public class EssentialsProtectBlockListener implements Listener } } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockIgnite(BlockIgniteEvent event) { - if (event.isCancelled()) - { - return; - } final Block block = event.getBlock(); if ((block.getType() == Material.RAILS || block.getType() == Material.POWERED_RAIL || block.getType() == Material.DETECTOR_RAIL) && prot.getSettingBool(ProtectConfig.protect_rails)) @@ -130,13 +121,9 @@ public class EssentialsProtectBlockListener implements Listener } } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockFromTo(final BlockFromToEvent event) { - if (event.isCancelled()) - { - return; - } final Block toBlock = event.getToBlock(); if ((toBlock.getType() == Material.RAILS || toBlock.getType() == Material.POWERED_RAIL || toBlock.getType() == Material.DETECTOR_RAIL) && prot.getSettingBool(ProtectConfig.protect_rails)) @@ -171,13 +158,9 @@ public class EssentialsProtectBlockListener implements Listener } } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockBurn(final BlockBurnEvent event) { - if (event.isCancelled()) - { - return; - } final Block block = event.getBlock(); if ((block.getType() == Material.RAILS || block.getType() == Material.POWERED_RAIL || block.getType() == Material.DETECTOR_RAIL) && prot.getSettingBool(ProtectConfig.protect_rails)) { @@ -207,13 +190,9 @@ public class EssentialsProtectBlockListener implements Listener BlockFace.SELF }; - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockBreak(final BlockBreakEvent event) { - if (event.isCancelled()) - { - return; - } final User user = ess.getUser(event.getPlayer()); final Block block = event.getBlock(); @@ -290,13 +269,9 @@ public class EssentialsProtectBlockListener implements Listener } } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockPistonExtend(BlockPistonExtendEvent event) { - if (event.isCancelled()) - { - return; - } for (Block block : event.getBlocks()) { if ((block.getRelative(BlockFace.UP).getType() == Material.RAILS @@ -338,10 +313,10 @@ public class EssentialsProtectBlockListener implements Listener } } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockPistonRetract(BlockPistonRetractEvent event) { - if (event.isCancelled() || !event.isSticky()) + if (!event.isSticky()) { return; } |