13
0

fix(gui): Hotfix Closing GUI before changing Type
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Chaos <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Chaos 2022-02-11 22:56:04 +01:00
Ursprung 5ebe8c2ce3
Commit 0e12df8b05
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4A63938B698948FD

Datei anzeigen

@ -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<SWListInv.SWListEntry<SchematicType>> types = new LinkedList<>();
for(SchematicType type : SchematicType.values()){
if(!type.isAssignable())
@ -166,8 +166,8 @@ public class GUI {
}
SWListInv<SchematicType> 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();