From 8353139d2c7a219bc7b63bf62e83c0e49ae1bf0f Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 19 Jan 2020 07:23:02 +0100 Subject: [PATCH] Fixing exceptions occuring in test and event arena Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/fight/Fight.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/fight/Fight.java b/FightSystem_Main/src/de/steamwar/fightsystem/fight/Fight.java index 062c600..31a7886 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/fight/Fight.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/fight/Fight.java @@ -114,6 +114,12 @@ public class Fight { } public static void calcAvailibleSchemTypes() { + if(redTeam.getLeader() == null || redTeam.getLeader().getPlayer() == null || + blueTeam.getLeader() == null || blueTeam.getLeader().getPlayer() == null){ + onlyPublicSchems = false; + return; + } + onlyPublicSchems = (Schematic.getSchemsOfType(redTeam.getLeader().getPlayer().getUniqueId(), Config.SchematicType).isEmpty() || Schematic.getSchemsOfType(blueTeam.getLeader().getPlayer().getUniqueId(), Config.SchematicType).isEmpty()); } -- 2.39.5