From 0e12df8b05339a161c098f0d2bca0faa94941e14 Mon Sep 17 00:00:00 2001 From: Chaos Date: Fri, 11 Feb 2022 22:56:04 +0100 Subject: [PATCH] fix(gui): Hotfix Closing GUI before changing Type Signed-off-by: Chaos --- .../src/de/steamwar/schematicsystem/commands/GUI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java index c7ff849..24d621e 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java @@ -90,7 +90,7 @@ public class GUI { }); if(!node.isDir()) { inv.setItem(6, SWItem.getMaterial("CAULDRON_ITEM"), "§e" + node.getSchemtype().name(), Arrays.asList("§7Zum Ändern", "§7anklicken"), node.getSchemtype().fightType(), click -> { - changeType(player, node, back); + changeType(player, node); }); inv.setItem(7, SWItem.getMaterial("MAGENTA_GLAZED_TERRACOTTA"), "§eDownload", click -> { player.closeInventory(); @@ -152,7 +152,7 @@ public class GUI { inv.open(); } - static void changeType(Player p, SchematicNode schem, SchematicSelector back){ + static void changeType(Player p, SchematicNode schem){ List> types = new LinkedList<>(); for(SchematicType type : SchematicType.values()){ if(!type.isAssignable()) @@ -166,8 +166,8 @@ public class GUI { } SWListInv inv = new SWListInv<>(p, "Typ ändern", types, (clickType, schematicType) -> { + p.closeInventory(); SchematicCommandUtils.changeType(p, schem, schematicType, null); - info(p, schem, back); }); inv.setCallback(-999, (ClickType click) -> p.closeInventory()); inv.open();