From 310c28d54b95f24e1e169010c3846a52deffe019 Mon Sep 17 00:00:00 2001 From: Chaos Date: Mon, 7 Feb 2022 09:37:19 +0100 Subject: [PATCH] Optimizing GUI --- .../src/de/steamwar/schematicsystem/commands/GUI.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java index 191bd12..c7ff849 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/GUI.java @@ -68,11 +68,7 @@ public class GUI { } inv.setItem(9, SWItem.getMaterial("LEASH"), "§eZurück", clickType -> { - if(back != null) { - back.reOpen(); - } else { - list(player); - } + back.reOpen(); }); if(node.getOwner() == user.getId()){ @@ -119,10 +115,9 @@ public class GUI { }); selector.open(); }); - Material finalMat = mat; inv.setItem(16, Material.NAME_TAG, "§eUmbenennen", clickType -> { SWAnvilInv anvilInv = new SWAnvilInv(player, node.getName() + " umbenennen", node.getName()); - anvilInv.setItem(finalMat); + anvilInv.setItem(mat); anvilInv.setCallback(s -> { SafeSchematicNode.Result result = SafeSchematicNode.setName(user, node, s); if(result.isSuccessful()) {