From 4d27cc36eb3cc193df1839e985ebfba8d345522e Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Fri, 18 Feb 2022 17:53:42 +0100 Subject: [PATCH] Sets the event priority for protection events to LOWEST --- .../permissionsigns/listener/BlockListener.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java b/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java index bf1748e..5b10321 100644 --- a/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java +++ b/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java @@ -13,6 +13,7 @@ import org.bukkit.block.data.type.WallSign; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockExplodeEvent; @@ -30,27 +31,27 @@ import static net.knarcraft.permissionsigns.PermissionSigns.extensiveSignProtect */ public class BlockListener implements Listener { - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onPistonExtend(BlockPistonExtendEvent event) { preventDestruction(event.getBlocks(), event); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onPistonRetract(BlockPistonRetractEvent event) { preventDestruction(event.getBlocks(), event); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onBlockExplode(BlockExplodeEvent event) { preventDestruction(event.blockList(), event); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onEntityExplode(EntityExplodeEvent event) { preventDestruction(event.blockList(), event); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onBlockBreak(BlockBreakEvent event) { Block block = event.getBlock(); Player player = event.getPlayer();