SteamWar/BauSystem
Archiviert
13
0

Add shutdown of bau after one minute no player

Dieser Commit ist enthalten in:
yoyosource 2021-04-02 16:20:34 +02:00
Ursprung 94fd196a08
Commit c3610be4e1

Datei anzeigen

@ -165,6 +165,9 @@ public class BauSystem extends JavaPlugin implements Listener {
Player p = e.getPlayer();
SWScoreboard.removeScoreboard(p);
if (Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().contains(p))) {
if (autoShutdown != null) {
autoShutdown.cancel();
}
autoShutdown = Bukkit.getScheduler().runTaskLater(this, Bukkit::shutdown, 1200);
}
}