diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java index d0a7ef71..91a79f5e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/NoClipCommand.java @@ -115,6 +115,7 @@ public class NoClipCommand extends SWCommand implements Listener { Abilities abilities = (((CraftPlayer) player).getHandle()).getAbilities(); abilities.mayBuild = true; abilities.mayfly = true; + abilities.instabuild = true; swPlayer.setComponent(new NoClipData()); BauSystem.MESSAGE.send("OTHER_NOCLIP_SLOT_INFO", player); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java index e7492216..a56a255e 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java @@ -131,6 +131,7 @@ public class BauScoreboard implements Listener { @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { + SWScoreboard.impl.removeScoreboard(event.getPlayer()); ADDITIONAL_SCOREBOARD_LINES.remove(event.getPlayer()); } } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java index c7c50e88..16a33267 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/scoreboard/SWScoreboard.java @@ -67,7 +67,9 @@ public class SWScoreboard { } public void removeScoreboard(Player player) { - player.getScoreboard().getObjective(SIDEBAR).unregister(); + if (player.getScoreboard().getObjective(SIDEBAR) != null) { + player.getScoreboard().getObjective(SIDEBAR).unregister(); + } playerBoards.remove(player); } }