From feedc725a2134a63d5d4ac32863e40d6d447c772 Mon Sep 17 00:00:00 2001 From: PhanaticD Date: Tue, 8 Jan 2019 11:35:07 -0500 Subject: [PATCH] make use of brand new FluidLevelChangeEvent --- src/com/projectkorra/projectkorra/PKListener.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/projectkorra/projectkorra/PKListener.java b/src/com/projectkorra/projectkorra/PKListener.java index 63a99442..6af794e9 100644 --- a/src/com/projectkorra/projectkorra/PKListener.java +++ b/src/com/projectkorra/projectkorra/PKListener.java @@ -163,6 +163,15 @@ public class PKListener implements Listener { } } + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) + public void onFluidLevelChange(FluidLevelChangeEvent event) { + if (TempBlock.isTempBlock(event.getBlock())){ + event.setCancelled(true); + } else if (TempBlock.isTouchingTempBlock(event.getBlock())) { + event.setCancelled(true); + } + } + @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onBlockForm(final BlockFormEvent event) { if (TempBlock.isTempBlock(event.getBlock())) {