Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
dc8d9ccf4b
Commit
f75efee1ab
@ -249,6 +249,9 @@ public class TNTSimulator {
|
|||||||
AtomicInteger currentTick = new AtomicInteger(0);
|
AtomicInteger currentTick = new AtomicInteger(0);
|
||||||
Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), bukkitTask -> {
|
Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), bukkitTask -> {
|
||||||
int tick = currentTick.get();
|
int tick = currentTick.get();
|
||||||
|
if (tick > maxTick.get()) bukkitTask.cancel();
|
||||||
|
currentTick.incrementAndGet();
|
||||||
|
|
||||||
List<List<Pair<Runnable, Integer>>> toSpawnInTick = toSpawn.get(tick);
|
List<List<Pair<Runnable, Integer>>> toSpawnInTick = toSpawn.get(tick);
|
||||||
if (toSpawnInTick == null) return;
|
if (toSpawnInTick == null) return;
|
||||||
toSpawnInTick.forEach(pairs -> {
|
toSpawnInTick.forEach(pairs -> {
|
||||||
@ -264,8 +267,6 @@ public class TNTSimulator {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (tick > maxTick.get()) bukkitTask.cancel();
|
|
||||||
currentTick.incrementAndGet();
|
|
||||||
}, 1, 1);
|
}, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren