diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/listener/BlockListener.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/listener/BlockListener.java index 403b339cc..df108498e 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/listener/BlockListener.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/listener/BlockListener.java @@ -186,12 +186,15 @@ public void onBlockDispense(@NotNull BlockDispenseEvent e) { e.setCancelled(true); } - @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + @EventHandler(priority = EventPriority.HIGHEST) public void onFlow(BlockFromToEvent e) { - if (Settings.DisableSpillProtection || !Tags.FLUID.contains(e.getBlock().getType())) + if (Settings.DisableSpillProtection || e.isCancelled()) + return; + Block block = e.getBlock(); + if (!Tags.FLUID.contains(block.getType())) return; - MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(e.getBlock().getLocation()); + MovecraftLocation loc = MathUtils.bukkit2MovecraftLoc(block.getLocation()); MovecraftLocation toLoc = MathUtils.bukkit2MovecraftLoc(e.getToBlock().getLocation()); for (Craft craft : CraftManager.getInstance().getCrafts()) { if (craft.getWorld() != e.getBlock().getWorld() || !craft.getHitBox().contains(loc) || craft.getFluidLocations().contains(toLoc))