From 13e36e19f2eb7436f0786a2dd27eb2a5b9f0290b Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 8 Jun 2019 13:17:05 +0200 Subject: [PATCH] Cancelling explosions --- .../yaruma/fightsystem/listener/EntityExplodeListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/me/yaruma/fightsystem/listener/EntityExplodeListener.java b/src/me/yaruma/fightsystem/listener/EntityExplodeListener.java index 620acbc..4ba85d5 100644 --- a/src/me/yaruma/fightsystem/listener/EntityExplodeListener.java +++ b/src/me/yaruma/fightsystem/listener/EntityExplodeListener.java @@ -12,7 +12,10 @@ public class EntityExplodeListener implements Listener { @EventHandler public void handleEntityExplode(EntityExplodeEvent event) { - if(FightSystem.getPlugin().getFightState() != FightState.RUNNING) return; + if(FightSystem.getFightState() != FightState.RUNNING){ + event.setCancelled(true); + return; + } for(Block block : event.blockList()) { if(block.getType() != Material.WATER || block.getType() != Material.STATIONARY_WATER) FightSystem.getPlugin().getWaterRemover().add(block.getLocation());