From 95afb5132134b0348cde57baf1ded6116a20e8cc Mon Sep 17 00:00:00 2001 From: JeromSar Date: Fri, 9 Aug 2013 15:10:04 +0200 Subject: [PATCH] Moved rollback events to listener with MONITOR priority --- .../Listener/TFM_BlockListener.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_BlockListener.java b/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_BlockListener.java index 806c6d73..617ad17a 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_BlockListener.java +++ b/src/me/StevenLawson/TotalFreedomMod/Listener/TFM_BlockListener.java @@ -98,11 +98,12 @@ public class TFM_BlockListener implements Listener } } } + } - if (!event.isCancelled()) - { - TFM_RollbackManager.blockBreak(event); - } + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + public void onRollbackBlockBreak(BlockBreakEvent event) + { + TFM_RollbackManager.blockBreak(event); } @EventHandler(priority = EventPriority.HIGH) @@ -244,11 +245,12 @@ public class TFM_BlockListener implements Listener break; } } + } - if (!event.isCancelled()) - { - TFM_RollbackManager.blockPlace(event); - } + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + public void onRollbackBlockPlace(BlockPlaceEvent event) + { + TFM_RollbackManager.blockPlace(event); } @EventHandler(priority = EventPriority.HIGH)