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