From f441f76f62c60a46f3a0a2742a553ddd328c27ce Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 25 Jul 2020 11:13:20 +0200 Subject: [PATCH] Fix 1.16 item selection Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/commands/GUI.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/commands/GUI.java b/FightSystem_Main/src/de/steamwar/fightsystem/commands/GUI.java index f4e4cc9..bb2fc80 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/commands/GUI.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/commands/GUI.java @@ -101,13 +101,19 @@ public class GUI { } SWInventory inv = new SWInventory(p, 9, Config.GameName + "-Auswahl"); - inv.setItem(8, Material.REDSTONE, "§eÖffentliches " + Config.GameName, (ClickType click) -> schemDialog(p, true)); + inv.setItem(8, Material.REDSTONE, "§eÖffentliches " + Config.GameName, (ClickType click) -> { + p.closeInventory(); + schemDialog(p, true); + }); if(Fight.getMaxRank() == 0){ inv.setItem(0, SWItem.getDye(8), (byte)8, "§7Keine privaten Schematics erlaubt", (ClickType click)->{}); }else if(Schematic.getSchemsOfType(p.getUniqueId(), Config.SchematicType).isEmpty() && !Config.test()){ inv.setItem(0, SWItem.getDye(8), (byte)8, "§7Kein privates " + Config.GameName + " vorhanden", (ClickType click)->{}); }else{ - inv.setItem(0, SWItem.getMaterial("CAULDRON_ITEM"), "§ePrivates " + Config.GameName, (ClickType click) -> schemDialog(p, false)); + inv.setItem(0, SWItem.getMaterial("CAULDRON_ITEM"), "§ePrivates " + Config.GameName, (ClickType click) -> { + p.closeInventory(); + schemDialog(p, false); + }); } inv.setCallback(-999, (ClickType click) -> p.closeInventory()); inv.open();