Add TNTSpawn naming
Dieser Commit ist enthalten in:
Ursprung
bbdf02594b
Commit
12ed389ae3
@ -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
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren