Fix pr stuff
Dieser Commit ist enthalten in:
Ursprung
b523747394
Commit
dbcadcfa0c
@ -33,9 +33,9 @@ import org.bukkit.entity.Player;
|
||||
public class CommandSimulator implements CommandExecutor {
|
||||
|
||||
private void help(Player player) {
|
||||
player.sendMessage("§8/§esimulator §8- §7Öffnet die Simulations GUI");
|
||||
player.sendMessage("§8/§esimulator §8- §7Öffnet das Simulations GUI");
|
||||
player.sendMessage("§8/§esimulator start §8- §7Startet die Simulation");
|
||||
player.sendMessage("§8/§esimulator wand §8- §7Legt den Simulator ins Inventar");
|
||||
player.sendMessage("§8/§esimulator wand §8- §7Legt den Simulatorstab ins Inventar");
|
||||
}
|
||||
|
||||
private boolean permissionCheck(Player player) {
|
||||
|
@ -32,13 +32,11 @@ import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.util.Consumer;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class TNTSimulator {
|
||||
|
||||
@ -318,15 +316,13 @@ public class TNTSimulator {
|
||||
}
|
||||
});
|
||||
AtomicInteger currentTick = new AtomicInteger(0);
|
||||
AtomicReference<Runnable> taskCanceler = new AtomicReference<>(() -> {});
|
||||
BukkitTask bukkitTask = Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), () -> {
|
||||
Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), bukkitTask -> {
|
||||
int tick = currentTick.get();
|
||||
spawnRandomList(first.getOrDefault(tick, EMPTY));
|
||||
spawnRandomList(second.getOrDefault(tick, EMPTY));
|
||||
if (tick > lastTick.get()) taskCanceler.get().run();
|
||||
if (tick > lastTick.get()) bukkitTask.cancel();
|
||||
currentTick.incrementAndGet();
|
||||
}, 1, 1);
|
||||
taskCanceler.set(bukkitTask::cancel);
|
||||
}
|
||||
|
||||
private void spawnRandomList(List<TNTSpawn> tntSpawns) {
|
||||
|
@ -26,7 +26,6 @@ import de.steamwar.bausystem.Permission;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren