From bb3ac6c515e3827109c3b818d8bdcdab8e0d097e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 29 Jul 2022 22:24:45 +0200 Subject: [PATCH] Fix FreezeListener again Signed-off-by: yoyosource --- .../steamwar/bausystem/features/region/FreezeListener.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java index a39822db..94708b4c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeListener.java @@ -108,4 +108,11 @@ public class FreezeListener implements Listener { event.getBlock().setType(Material.AIR, false); } } + + @EventHandler + public void onFluidLevelChange(FluidLevelChangeEvent e) { + if (Region.getRegion(e.getBlock().getLocation()).get(Flag.FREEZE) == FreezeMode.ACTIVE) { + e.setCancelled(true); + } + } }