From feac17d7326e933321b33cd3ee632bba6cc659a6 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 20 Dec 2025 21:58:44 +0100 Subject: [PATCH] Fix kits frfr Signed-off-by: Chaoscaot --- .../src/de/steamwar/fightsystem/commands/GUI.java | 3 ++- .../SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java index 729ce0b6..bd66ffeb 100644 --- a/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java +++ b/FightSystem/FightSystem_Core/src/de/steamwar/fightsystem/commands/GUI.java @@ -182,7 +182,8 @@ public class GUI { } Kit prototype = Kit.getAvailableKits(Fight.getFightPlayer(p).isLeader()).get(0); PersonalKit kit = PersonalKit.create(user.getId(), Config.GameModeConfig.Schematic.Type.toDB(), s, prototype.getInventory(), prototype.getArmor()); - PersonalKitCreator.openKitCreator(p, kit); + p.closeInventory(); + Bukkit.getScheduler().runTask(FightSystem.getPlugin(), () -> PersonalKitCreator.openKitCreator(p, kit)); }); anvilInv.open(); }); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java index e8ac661e..f074db30 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/sql/PersonalKit.java @@ -55,7 +55,7 @@ public class PersonalKit { public ItemStack[] getArmor(){ YamlConfiguration config = YamlConfiguration.loadConfiguration(new StringReader(getRawArmor())); - return Objects.requireNonNull(config.getList("Armor")).toArray(new ItemStack[0]); + return Objects.requireNonNull(config.getList("Armor")).toArray(new ItemStack[4]); } public void setInUse() {