mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-18 22:24:35 +00:00
make use of brand new FluidLevelChangeEvent
This commit is contained in:
parent
5fe6d2ee3f
commit
feedc725a2
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||||
public void onBlockForm(final BlockFormEvent event) {
|
public void onBlockForm(final BlockFormEvent event) {
|
||||||
if (TempBlock.isTempBlock(event.getBlock())) {
|
if (TempBlock.isTempBlock(event.getBlock())) {
|
||||||
|
|
Loading…
Reference in a new issue