Merge pull request 'Fix ConcurrentModificationException' (#112) from FixTracer into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
df44910ff5
@ -40,23 +40,7 @@ public class TNTTracer {
|
|||||||
private static final TraceCache traceCache = new TraceCache();
|
private static final TraceCache traceCache = new TraceCache();
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), () -> {
|
Bukkit.getScheduler().runTaskTimer(BauSystem.getPlugin(), TNTTracer::run, 0, 20);
|
||||||
synchronized (synchronizer) {
|
|
||||||
synchronizer.notifyAll();
|
|
||||||
}
|
|
||||||
}, 1, 20);
|
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(BauSystem.getPlugin(), () -> {
|
|
||||||
while (true) {
|
|
||||||
synchronized (synchronizer) {
|
|
||||||
try {
|
|
||||||
synchronizer.wait();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
run();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void run() {
|
private static void run() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren