SteamWar/BauSystem2.0
Archiviert
12
0

REntity #148

Zusammengeführt
YoyoNow hat 19 Commits von REntity nach master 2023-02-24 20:31:33 +01:00 zusammengeführt
Nur Änderungen aus Commit 162e3f16b7 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -75,19 +75,6 @@ public class TNTSimulatorGui {
if (back != null) { if (back != null) {
inv.setItem(47, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("SIMULATOR_BACK", player), clickType -> back.run())); inv.setItem(47, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("SIMULATOR_BACK", player), clickType -> back.run()));
} }
if (currentTntSimulator != null) {
if (totalTNTCount > 0) {
inv.setItem(48, new SWItem(Material.MAGENTA_GLAZED_TERRACOTTA, BauSystem.MESSAGE.parse("SIMULATOR_GUI_MOVE_ALL", player), clickType -> {
moveAll(player, currentTntSimulator, () -> open(player, currentTntSimulator, currentTntGroup, simulatorElements, back));
}));
}
boolean simulatorAutoTrace = Config.getInstance().get(player).getPlainValueOrDefault("simulatorAutoTrace", false);
inv.setItem(47, new SWItem(simulatorAutoTrace ? Material.CHAIN_COMMAND_BLOCK : Material.COMMAND_BLOCK, BauSystem.MESSAGE.parse("SIMULATOR_GUI_AUTO_TRACE", player, simulatorAutoTrace), clickType -> {
Config.getInstance().get(player).put("simulatorAutoTrace", !simulatorAutoTrace);
open(player, currentTntSimulator, currentTntGroup, simulatorElements, back);
}));
}
SWItem swItem = new SWItem(Material.TNT_MINECART, BauSystem.MESSAGE.parse("SIMULATOR_GUI_TOTAL_TNT", player, totalTNTCount), clickType -> { SWItem swItem = new SWItem(Material.TNT_MINECART, BauSystem.MESSAGE.parse("SIMULATOR_GUI_TOTAL_TNT", player, totalTNTCount), clickType -> {
}); });
swItem.getItemStack().setAmount(totalTNTCount); swItem.getItemStack().setAmount(totalTNTCount);
@ -125,6 +112,19 @@ public class TNTSimulatorGui {
})); }));
} }
} }
if (currentTntSimulator != null) {
if (totalTNTCount > 0) {
inv.setItem(48, new SWItem(Material.MAGENTA_GLAZED_TERRACOTTA, BauSystem.MESSAGE.parse("SIMULATOR_GUI_MOVE_ALL", player), clickType -> {
moveAll(player, currentTntSimulator, () -> open(player, currentTntSimulator, currentTntGroup, simulatorElements, back));
}));
}
boolean simulatorAutoTrace = Config.getInstance().get(player).getPlainValueOrDefault("simulatorAutoTrace", false);
inv.setItem(47, new SWItem(simulatorAutoTrace ? Material.CHAIN_COMMAND_BLOCK : Material.COMMAND_BLOCK, BauSystem.MESSAGE.parse("SIMULATOR_GUI_AUTO_TRACE", player, simulatorAutoTrace), clickType -> {
Config.getInstance().get(player).put("simulatorAutoTrace", !simulatorAutoTrace);
open(player, currentTntSimulator, currentTntGroup, simulatorElements, back);
}));
}
if (currentTntSimulator != null || currentTntGroup != null) { if (currentTntSimulator != null || currentTntGroup != null) {
inv.setItem(51, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("SIMULATOR_GUI_DELETE", player), clickType -> { inv.setItem(51, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("SIMULATOR_GUI_DELETE", player), clickType -> {