diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 72b387b..449fff9 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -254,8 +254,9 @@ public class BauSystem extends JavaPlugin implements Listener { @EventHandler public void onLeave(PlayerQuitEvent e) { - SWScoreboard.removeScoreboard(e.getPlayer()); - if(Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().contains(e.getPlayer()))) + Player player = e.getPlayer(); + SWScoreboard.removeScoreboard(player); + if(Bukkit.getOnlinePlayers().isEmpty() || (Bukkit.getOnlinePlayers().size() == 1 && Bukkit.getOnlinePlayers().contains(player))) Bukkit.shutdown(); } }