From 2cd3334b99cf4ec65c84001e48230a2d049f665e Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 5 Dec 2019 20:49:17 +0100 Subject: [PATCH] untested rework of dependent scoreboard source --- .../core/events/PlayerJoinedEvent.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java b/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java index 0ef2da6..71d95ec 100644 --- a/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java +++ b/SpigotCore_Main/src/de/steamwar/core/events/PlayerJoinedEvent.java @@ -48,16 +48,6 @@ public class PlayerJoinedEvent implements Listener{ } event.setJoinMessage("§a§l» §r" + player.getDisplayName()); - } - - @EventHandler - private void onQuit(PlayerQuitEvent event) { - Player player = event.getPlayer(); - - event.setQuitMessage("§c§l« §r" + player.getDisplayName()); - - SWScoreboard.getPlayerBoards().remove(player); - //TEST @@ -77,4 +67,13 @@ public class PlayerJoinedEvent implements Listener{ }); SWScoreboard.getPlayerBoards().put(player, swScoreboard); } + + @EventHandler + private void onQuit(PlayerQuitEvent event) { + Player player = event.getPlayer(); + + event.setQuitMessage("§c§l« §r" + player.getDisplayName()); + + SWScoreboard.getPlayerBoards().remove(player); + } }