SteamWar/BauSystem2.0
Archiviert
12
0

Update TNTSimulator once again
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-12-10 22:58:13 +01:00
Ursprung 873b97f70d
Commit 161341da72
2 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -100,6 +100,11 @@ public class TNTSimulator {
simulator.hide(); simulator.hide();
} }
public void remove() {
TNTSimulator simulator = TNT_SIMULATOR_MAP.remove(player);
simulator.hide();
}
private final Set<TNTSpawn> spawns = new HashSet<>(); private final Set<TNTSpawn> spawns = new HashSet<>();
private final Player player; private final Player player;
@ -430,7 +435,7 @@ public class TNTSimulator {
// Change TickOffset // Change TickOffset
swInventory.setItem(2, new SWItem(SWItem.getDye(10), "§7+1", Arrays.asList("§eShift §7Click für §e+5"), false, clickType -> { swInventory.setItem(2, new SWItem(SWItem.getDye(10), "§7+1", Arrays.asList("§eShift §7Click für §e+5"), false, clickType -> {
setTickOffset(count + (clickType.isShiftClick() ? 5 : 1)); setTickOffset(tickOffset + (clickType.isShiftClick() ? 5 : 1));
editTNT(); editTNT();
})); }));
SWItem tickItem = new SWItem(SWItem.getMaterial("DIODE"), "§7Tick §8- §e" + tickOffset, LORE, false, clickType -> changeCount(player, "Tick Offset", tickOffset, tick -> { SWItem tickItem = new SWItem(SWItem.getMaterial("DIODE"), "§7Tick §8- §e" + tickOffset, LORE, false, clickType -> changeCount(player, "Tick Offset", tickOffset, tick -> {
@ -440,7 +445,7 @@ public class TNTSimulator {
tickItem.getItemStack().setAmount(Math.max(tickOffset, 1)); tickItem.getItemStack().setAmount(Math.max(tickOffset, 1));
swInventory.setItem(11, tickItem); swInventory.setItem(11, tickItem);
swInventory.setItem(20, new SWItem(SWItem.getDye(1), "§7-1", Arrays.asList("§eShift §7Click für §e-5"), false, clickType -> { swInventory.setItem(20, new SWItem(SWItem.getDye(1), "§7-1", Arrays.asList("§eShift §7Click für §e-5"), false, clickType -> {
setTickOffset(count - (clickType.isShiftClick() ? 5 : 1)); setTickOffset(tickOffset - (clickType.isShiftClick() ? 5 : 1));
editTNT(); editTNT();
})); }));

Datei anzeigen

@ -119,7 +119,6 @@ public class TNTSimulatorListener implements Listener, Disable {
if (event.getItem() == null || !event.getItem().isSimilar(WAND)) { if (event.getItem() == null || !event.getItem().isSimilar(WAND)) {
return; return;
} }
System.out.println(event);
event.setCancelled(true); event.setCancelled(true);
if (!permissionCheck(event.getPlayer())) { if (!permissionCheck(event.getPlayer())) {
@ -142,7 +141,8 @@ public class TNTSimulatorListener implements Listener, Disable {
@EventHandler @EventHandler
public void onPlayerQuit(PlayerQuitEvent event) { public void onPlayerQuit(PlayerQuitEvent event) {
get(event.getPlayer()).saveAndDelete(); get(event.getPlayer()).save();
get(event.getPlayer()).remove();
} }
@Override @Override