SteamWar/BauSystem
Archiviert
13
0

Merge branch 'master' into RedstoneTester

Dieser Commit ist enthalten in:
YoyoNow 2021-03-08 12:40:44 +01:00
Commit f14b135cd9

Datei anzeigen

@ -74,7 +74,9 @@ public class TNTSimulator {
lore.add("§7X§8: §e" + tntSpawn.getPosition().getX());
lore.add("§7Y§8: §e" + tntSpawn.getPosition().getY());
lore.add("§7Z§8: §e" + tntSpawn.getPosition().getZ());
swListEntryList.add(new SWListInv.SWListEntry<>(new SWItem(Material.TNT, "§eTNT", lore, false, null), tntSpawn));
SWItem swItem = new SWItem(Material.TNT, "§eTNT", lore, false, null);
swItem.getItemStack().setAmount(tntSpawn.count);
swListEntryList.add(new SWListInv.SWListEntry<>(swItem, tntSpawn));
});
swListEntryList.sort(Comparator.comparing(SWListInv.SWListEntry::getObject));
@ -114,14 +116,16 @@ public class TNTSimulator {
}
editTNT(player, tntSpawn);
}));
swInventory.setItem(19, new SWItem(Material.TNT, "§7Anzahl §8- §e" + tntSpawn.getCount(), LORE, false, clickType -> {
SWItem countItem = new SWItem(Material.TNT, "§7Anzahl §8- §e" + tntSpawn.getCount(), LORE, false, clickType -> {
changeCount(player, "Anzahl TNT", tntSpawn.getCount(), count -> {
if (count < 1) count = 1;
if (count > 400) count = 400;
tntSpawn.setCount(count);
editTNT(player, tntSpawn);
}, () -> editTNT(player, tntSpawn));
}));
});
countItem.getItemStack().setAmount(tntSpawn.getCount());
swInventory.setItem(19, countItem);
swInventory.setItem(28, new SWItem(SWItem.getDye(1), "§7-1", clickType -> {
tntSpawn.setCount(tntSpawn.getCount() - 1);
if (tntSpawn.getCount() < 1) {
@ -138,14 +142,16 @@ public class TNTSimulator {
}
editTNT(player, tntSpawn);
}));
swInventory.setItem(20, new SWItem(Material.CLOCK, "§7Tick §8- §e" + tntSpawn.getTickOffset(), LORE, false, clickType -> {
SWItem tickItem = new SWItem(Material.CLOCK, "§7Tick §8- §e" + tntSpawn.getTickOffset(), LORE, false, clickType -> {
changeCount(player, "Tick Offset", tntSpawn.getTickOffset(), tick -> {
if (tick < 0) tick = 0;
if (tick > 8000) tick = 8000;
tntSpawn.setTickOffset(tick);
editTNT(player, tntSpawn);
}, () -> editTNT(player, tntSpawn));
}));
});
tickItem.getItemStack().setAmount(Math.max(tntSpawn.getTickOffset(), 1));
swInventory.setItem(20, tickItem);
swInventory.setItem(29, new SWItem(SWItem.getDye(1), "§7-1", clickType -> {
tntSpawn.setTickOffset(tntSpawn.getTickOffset() - 1);
if (tntSpawn.getTickOffset() < 0) {
@ -162,14 +168,16 @@ public class TNTSimulator {
}
editTNT(player, tntSpawn);
}));
swInventory.setItem(21, new SWItem(Material.CLOCK, "§7Fuse-Ticks §8- §e" + tntSpawn.getFuseTicks(), LORE, false, clickType -> {
SWItem fuseTickItem = new SWItem(Material.CLOCK, "§7Fuse-Ticks §8- §e" + tntSpawn.getFuseTicks(), LORE, false, clickType -> {
changeCount(player, "Fuse-Ticks", tntSpawn.getFuseTicks(), tick -> {
if (tick < 0) tick = 0;
if (tick > 80) tick = 80;
tntSpawn.setFuseTicks(tick);
editTNT(player, tntSpawn);
}, () -> editTNT(player, tntSpawn));
}));
});
fuseTickItem.getItemStack().setAmount(Math.max(tntSpawn.getFuseTicks(), 1));
swInventory.setItem(21, fuseTickItem);
swInventory.setItem(30, new SWItem(SWItem.getDye(1), "§7-1", clickType -> {
tntSpawn.setFuseTicks(tntSpawn.getFuseTicks() - 1);
if (tntSpawn.getFuseTicks() < 1) {