Archiviert
1
0
Dieser Commit ist enthalten in:
Chaoscaot 2023-04-06 17:30:18 +02:00
Ursprung f624d2893d
Commit badb5e5e1e

Datei anzeigen

@ -36,14 +36,15 @@ public class SchematicSearch {
private static void startQueueWatchdog() {
watchdog = BungeeCore.get().getProxy().getScheduler().schedule(BungeeCore.get(), () -> {
synchronized (searchQueue) {
if(searchQueue.isEmpty()) {
watchdog.cancel();
watchdog = null;
return;
}
if(currentSearch == null) {
if(!searchQueue.isEmpty()) {
currentSearch = searchQueue.remove(0);
currentSearch.start();
} else {
watchdog.cancel();
watchdog = null;
}
currentSearch = searchQueue.remove(0);
currentSearch.start();
}
}
}, 0, 1, TimeUnit.SECONDS);