diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 51d95c36a..072a7f700 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -182,12 +182,11 @@ public final class Misc { } public static void profileCleanup(String playerName) { - McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName); - Player player = mcMMOPlayer.getPlayer(); - UserManager.remove(playerName); - if (player.isOnline()) { + Player player = mcMMO.p.getServer().getPlayerExact(playerName); + + if (player != null) { UserManager.addUser(player); } }