Cancelling explosions
Dieser Commit ist enthalten in:
Ursprung
9377db47e5
Commit
13e36e19f2
@ -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());
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren