diff --git a/BauSystem_Main/src/de/steamwar/bausystem/cannonsimulator/TNTSimulator.java b/BauSystem_Main/src/de/steamwar/bausystem/cannonsimulator/TNTSimulator.java index 36c2a8e..e1aae1a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/cannonsimulator/TNTSimulator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/cannonsimulator/TNTSimulator.java @@ -103,7 +103,7 @@ public class TNTSimulator { static void editTNT(Player player, TNTSpawn tntSpawn) { TNTSimulator tntSimulator = get(player); - SWInventory swInventory = new SWInventory(player, 54, "TNT" + (tntSpawn.getName().isEmpty() ? "§8- §e" + tntSpawn.getName() : "")); + SWInventory swInventory = new SWInventory(player, 54, "TNT" + (!tntSpawn.getName().isEmpty() ? "§8- §e" + tntSpawn.getName() : "")); swInventory.setItem(49, new SWItem(Material.REDSTONE_BLOCK, "§cZurück", clickType -> { openSimulator(player); })); @@ -116,12 +116,12 @@ public class TNTSimulator { // tnt Name swInventory.setItem(45, new SWItem(Material.NAME_TAG, "§eName", clickType -> { - SWAnvilInv swAnvilInv = new SWAnvilInv(player, "Name"); - swAnvilInv.setCallback(s -> { + TNTSimulatorAnvil tntSimulatorAnvil = new TNTSimulatorAnvil(player, "Name", tntSpawn.getName()); + tntSimulatorAnvil.setCallback(s -> { tntSpawn.setName(s); editTNT(player, tntSpawn); }); - swAnvilInv.open(); + tntSimulatorAnvil.open(); })); // Change Count of spawned TNT