make use of brand new FluidLevelChangeEvent

This commit is contained in:
PhanaticD 2019-01-08 11:35:07 -05:00
parent 5fe6d2ee3f
commit feedc725a2

View file

@ -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())) {