This reverts commit 8e3bba677e
.
Dieser Commit ist enthalten in:
Ursprung
8e3bba677e
Commit
71fb547604
@ -65,24 +65,20 @@ public class AutoShutdownListener implements Listener {
|
||||
@Override
|
||||
public void run() {
|
||||
if (count >= 300) {
|
||||
scheduleSyncShutdown();
|
||||
Bukkit.shutdown();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (RamUsage.getUsage() > 0.8) {
|
||||
scheduleSyncShutdown();
|
||||
Bukkit.shutdown();
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
Bukkit.getLogger().log(Level.WARNING, throwable.getMessage(), throwable);
|
||||
scheduleSyncShutdown();
|
||||
Bukkit.shutdown();
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}, 20, 20);
|
||||
}
|
||||
}
|
||||
|
||||
private void scheduleSyncShutdown() {
|
||||
Bukkit.getScheduler().runTask(BauSystem.getInstance(), Bukkit::shutdown);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren