Fixed NPE at player quit

This commit is contained in:
Norbi Peti 2016-11-30 17:30:52 +01:00 committed by GitHub
parent e636738acb
commit c155eb761b

View file

@ -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
}
}
}