From 94fd196a08ce5b4054f3e1c5ad7fc9aa51ddc372 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 2 Apr 2021 16:16:25 +0200 Subject: [PATCH] Add shutdown of bau after one minute no player --- BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 78869bc..3f889cf 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -165,7 +165,7 @@ 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))) { - Bukkit.shutdown(); + autoShutdown = Bukkit.getScheduler().runTaskLater(this, Bukkit::shutdown, 1200); } }