diff --git a/src/de/steamwar/bungeecore/comms/handlers/FightEndsHandler.java b/src/de/steamwar/bungeecore/comms/handlers/FightEndsHandler.java index d64c9a2..bf65892 100644 --- a/src/de/steamwar/bungeecore/comms/handlers/FightEndsHandler.java +++ b/src/de/steamwar/bungeecore/comms/handlers/FightEndsHandler.java @@ -46,6 +46,13 @@ public class FightEndsHandler implements SpigotHandler { return; } + int blueSchemOwner = SchemNode.getSchematicOwner(fightEndsPacket.getBlueSchem()); + int redSchemOwner = SchemNode.getSchematicOwner(fightEndsPacket.getRedSchem()); + + if ((blueSchemOwner == 0 && redSchemOwner != 0) || (blueSchemOwner != 0 && redSchemOwner == 0)) { + return; + } + double blueResult; if (fightEndsPacket.getWin() == 0) { blueResult = 0.5; @@ -55,13 +62,6 @@ public class FightEndsHandler implements SpigotHandler { blueResult = 0; } - int blueSchemOwner = SchemNode.getSchematicOwner(fightEndsPacket.getBlueSchem()); - int redSchemOwner = SchemNode.getSchematicOwner(fightEndsPacket.getRedSchem()); - - if ((blueSchemOwner == 0 && redSchemOwner != 0) || (blueSchemOwner != 0 && redSchemOwner == 0)) { - return; - } - int blueSchemElo = SchemElo.getElo(fightEndsPacket.getBlueSchem()); int redSchemElo = SchemElo.getElo(fightEndsPacket.getRedSchem());