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