Add TNTSimulator.LORE
Dieser Commit ist enthalten in:
Ursprung
1942a2c355
Commit
d5ed63f938
@ -22,7 +22,6 @@
|
||||
package de.steamwar.bausystem.canonsimulator;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.inventory.SWAnvilInv;
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.inventory.SWListInv;
|
||||
@ -43,6 +42,7 @@ public class TNTSimulator {
|
||||
private static final Vector NY_VECTOR = new Vector(0, -0.0625, 0);
|
||||
private static final Vector Z_VECTOR = new Vector(0, 0, 0.0625);
|
||||
private static final Vector NZ_VECTOR = new Vector(0, 0, -0.0625);
|
||||
private static final List<String> LORE = Arrays.asList("§7Klicken zum ändern");
|
||||
|
||||
static Map<Player, TNTSimulator> tntSimulatorMap = new HashMap<>();
|
||||
|
||||
@ -57,6 +57,8 @@ public class TNTSimulator {
|
||||
List<SWListInv.SWListEntry<TNTSpawn>> swListEntryList = new ArrayList<>();
|
||||
tntSimulator.tntSpawns.forEach(tntSpawn -> {
|
||||
List<String> lore = new ArrayList<>();
|
||||
lore.add("§7Klicken zum einstellen");
|
||||
lore.add("");
|
||||
lore.add("§eTNT-Anzahl§8: §7" + tntSpawn.getCount());
|
||||
lore.add("§eTick§8: §7" + tntSpawn.getTickOffset());
|
||||
lore.add("§eFuse-Tick§8: §7" + tntSpawn.getFuseTicks());
|
||||
@ -121,7 +123,7 @@ public class TNTSimulator {
|
||||
}
|
||||
editTNT(player, tntSpawn);
|
||||
}));
|
||||
swInventory.setItem(19, new SWItem(Material.TNT, "§eAnzahl §8- §7" + tntSpawn.getCount(), clickType -> {
|
||||
swInventory.setItem(19, new SWItem(Material.TNT, "§eAnzahl §8- §7" + tntSpawn.getCount(), LORE, false, clickType -> {
|
||||
changeCount(player, tntSpawn.getCount(), count -> {
|
||||
if (count < 1) count = 1;
|
||||
if (count > 1000) count = 1000;
|
||||
@ -145,7 +147,7 @@ public class TNTSimulator {
|
||||
}
|
||||
editTNT(player, tntSpawn);
|
||||
}));
|
||||
swInventory.setItem(20, new SWItem(Material.CLOCK, "§eTick §8- §7" + tntSpawn.getTickOffset(), clickType -> {
|
||||
swInventory.setItem(20, new SWItem(Material.CLOCK, "§eTick §8- §7" + tntSpawn.getTickOffset(), LORE, false, clickType -> {
|
||||
changeCount(player, tntSpawn.getTickOffset(), tick -> {
|
||||
if (tick < 0) tick = 0;
|
||||
if (tick > 8000) tick = 8000;
|
||||
@ -169,7 +171,7 @@ public class TNTSimulator {
|
||||
}
|
||||
editTNT(player, tntSpawn);
|
||||
}));
|
||||
swInventory.setItem(21, new SWItem(Material.CLOCK, "§eFuseTicks §8- §7" + tntSpawn.getFuseTicks(), clickType -> {
|
||||
swInventory.setItem(21, new SWItem(Material.CLOCK, "§eFuseTicks §8- §7" + tntSpawn.getFuseTicks(), LORE, false, clickType -> {
|
||||
changeCount(player, tntSpawn.getFuseTicks(), tick -> {
|
||||
if (tick < 0) tick = 0;
|
||||
if (tick > 80) tick = 80;
|
||||
@ -204,7 +206,7 @@ public class TNTSimulator {
|
||||
tntSpawn.getPosition().add(X_VECTOR);
|
||||
editTNT(player, tntSpawn);
|
||||
}));
|
||||
swInventory.setItem(23, new SWItem(Material.PAPER, "§ePosition-X §8- §7" + tntSpawn.getPosition().getX(), clickType -> {
|
||||
swInventory.setItem(23, new SWItem(Material.PAPER, "§ePosition-X §8- §7" + tntSpawn.getPosition().getX(), LORE, false, clickType -> {
|
||||
changePosition(player, tntSpawn.getPosition().getX(), x -> {
|
||||
tntSpawn.getPosition().setX(clamp(x));
|
||||
editTNT(player, tntSpawn);
|
||||
@ -220,7 +222,7 @@ public class TNTSimulator {
|
||||
tntSpawn.getPosition().add(Y_VECTOR);
|
||||
editTNT(player, tntSpawn);
|
||||
}));
|
||||
swInventory.setItem(24, new SWItem(Material.PAPER, "§ePosition-Y §8- §7" + tntSpawn.getPosition().getY(), clickType -> {
|
||||
swInventory.setItem(24, new SWItem(Material.PAPER, "§ePosition-Y §8- §7" + tntSpawn.getPosition().getY(), LORE, false, clickType -> {
|
||||
changePosition(player, tntSpawn.getPosition().getY(), y -> {
|
||||
tntSpawn.getPosition().setY(clamp(y));
|
||||
editTNT(player, tntSpawn);
|
||||
@ -236,7 +238,7 @@ public class TNTSimulator {
|
||||
tntSpawn.getPosition().add(Z_VECTOR);
|
||||
editTNT(player, tntSpawn);
|
||||
}));
|
||||
swInventory.setItem(25, new SWItem(Material.PAPER, "§ePosition-Z §8- §7" + tntSpawn.getPosition().getZ(), clickType -> {
|
||||
swInventory.setItem(25, new SWItem(Material.PAPER, "§ePosition-Z §8- §7" + tntSpawn.getPosition().getZ(), LORE, false, clickType -> {
|
||||
changePosition(player, tntSpawn.getPosition().getZ(), z -> {
|
||||
tntSpawn.getPosition().setZ(clamp(z));
|
||||
editTNT(player, tntSpawn);
|
||||
|
@ -30,7 +30,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
public class TNTSimulatorListener implements Listener {
|
||||
|
||||
private static final Vector HALF = new Vector(0.5, 0.5, 0.5);
|
||||
private static final Vector HALF = new Vector(0.5, 0, 0.5);
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren