From 25f6ecfbcc5bd2711af97806c7c2e4a1e5a42990 Mon Sep 17 00:00:00 2001 From: Archy-X <63976867+Archy-X@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:52:10 -0700 Subject: [PATCH] Fix XP duplication exploit with land claiming plugins --- .../auraskills/bukkit/region/RegionBlockListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/region/RegionBlockListener.java b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/region/RegionBlockListener.java index 36147f11e..e38446410 100644 --- a/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/region/RegionBlockListener.java +++ b/bukkit/src/main/java/dev/aurelium/auraskills/bukkit/region/RegionBlockListener.java @@ -69,7 +69,7 @@ public void checkPlace(BlockPlaceEvent event) { regionManager.addPlacedBlock(block); } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onSandFall(EntityChangeBlockEvent event) { Block block = event.getBlock(); if (!regionManager.isPlacedBlock(block)) return; @@ -113,7 +113,7 @@ public void checkBreak(BlockBreakEvent event) { checkSupportSide(block); } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockPistonExtend(BlockPistonExtendEvent event) { for (Block block : event.getBlocks()) { regionManager.addPlacedBlock(block.getRelative(event.getDirection())); @@ -121,7 +121,7 @@ public void onBlockPistonExtend(BlockPistonExtendEvent event) { regionManager.removePlacedBlock(event.getBlock().getRelative(event.getDirection())); } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockPistonRetract(BlockPistonRetractEvent event) { Block lastBlock = event.getBlock(); for (Block block : event.getBlocks()) { @@ -135,7 +135,7 @@ public void onBlockPistonRetract(BlockPistonRetractEvent event) { regionManager.removePlacedBlock(lastBlock); } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onStructureGrow(StructureGrowEvent event) { int growY = event.getLocation().getBlockY(); for (BlockState state : event.getBlocks()) {