SteamWar/BauSystem2.0
Archiviert
12
0

Fix TNTSimulatorGui
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-02-24 20:30:04 +01:00
Ursprung 070a58651b
Commit 162e3f16b7

Datei anzeigen

@ -75,19 +75,6 @@ public class TNTSimulatorGui {
if (back != null) {
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.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) {
inv.setItem(51, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("SIMULATOR_GUI_DELETE", player), clickType -> {