From 4d51c1ff63e2a5c85762247fcfc62ad7f72a002d Mon Sep 17 00:00:00 2001 From: Zeanon Date: Thu, 10 Feb 2022 18:34:37 +0100 Subject: [PATCH] cleanup --- .../winconditions/PercentWincondition.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PercentWincondition.java b/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PercentWincondition.java index 75554d2..c0e481c 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PercentWincondition.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/winconditions/PercentWincondition.java @@ -106,19 +106,17 @@ public class PercentWincondition extends Wincondition implements PrintableWincon @EventHandler public void onEntityExplode(EntityExplodeEvent event) { - if (event.getEntityType() != EntityType.FIREBALL) { - if (explosionFilter.getAsBoolean() || !team.getExtendRegion().inRegion(event.getEntity().getLocation())) { - return; - } - - event.blockList().forEach(block -> { - if (testBlock.test(block.getType())) { - currentBlocks--; - } - }); - - checkWin.accept(team); + if (event.getEntityType() == EntityType.FIREBALL || explosionFilter.getAsBoolean() || !team.getExtendRegion().inRegion(event.getEntity().getLocation())) { + return; } + + event.blockList().forEach(block -> { + if (testBlock.test(block.getType())) { + currentBlocks--; + } + }); + + checkWin.accept(team); } private void enable() {