SteamWar/FightSystem
Archiviert
13
1

Cancelling explosions

Dieser Commit ist enthalten in:
Lixfel 2019-06-08 13:17:05 +02:00
Ursprung 9377db47e5
Commit 13e36e19f2

Datei anzeigen

@ -12,7 +12,10 @@ public class EntityExplodeListener implements Listener {
@EventHandler @EventHandler
public void handleEntityExplode(EntityExplodeEvent event) { 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()) { for(Block block : event.blockList()) {
if(block.getType() != Material.WATER || block.getType() != Material.STATIONARY_WATER) if(block.getType() != Material.WATER || block.getType() != Material.STATIONARY_WATER)
FightSystem.getPlugin().getWaterRemover().add(block.getLocation()); FightSystem.getPlugin().getWaterRemover().add(block.getLocation());