From c155eb761b3b52efc9c229e6e92b24d19f64c491 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Wed, 30 Nov 2016 17:30:52 +0100 Subject: [PATCH] Fixed NPE at player quit --- src/main/java/buttondevteam/lib/TBMCPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/buttondevteam/lib/TBMCPlayer.java b/src/main/java/buttondevteam/lib/TBMCPlayer.java index 203328f..c23a74a 100644 --- a/src/main/java/buttondevteam/lib/TBMCPlayer.java +++ b/src/main/java/buttondevteam/lib/TBMCPlayer.java @@ -433,8 +433,8 @@ public class TBMCPlayer implements AutoCloseable { * Only intended to use from ButtonCore */ public static void quitPlayer(TBMCPlayer player) { - getLoadedPlayers().remove(player.uuid); Bukkit.getServer().getPluginManager().callEvent(new TBMCPlayerQuitEvent(player)); + getLoadedPlayers().remove(player.uuid); } /** @@ -469,4 +469,4 @@ public class TBMCPlayer implements AutoCloseable { public enum InfoTarget { MCHover, MCCommand, Discord } -} \ No newline at end of file +}