From a8112eccc8ef3909b18c98181f50f1415463df14 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 29 Nov 2023 15:34:07 +0100 Subject: [PATCH] Make Armor Mandatory in yaml kits. Signed-off-by: Lixfel --- FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java b/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java index 0ba4628..2af787c 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/fight/Kit.java @@ -104,10 +104,7 @@ public class Kit { public Kit(ConfigurationSection kit){ name = kit.getName(); inventory = Objects.requireNonNull(kit.getList("Items")).toArray(new ItemStack[0]); - if(kit.isList("Armor")) - armor = Objects.requireNonNull(kit.getList("Armor")).toArray(new ItemStack[0]); - else - armor = null; + armor = Objects.requireNonNull(kit.getList("Armor")).toArray(new ItemStack[0]); leaderAllowed = kit.getBoolean("LeaderAllowed"); memberAllowed = kit.getBoolean("MemberAllowed"); if(kit.isList("Effects"))