Fix a NPE when trying to join a non-existing player

Fixes #860
This commit is contained in:
TfT_02
2013-03-21 22:04:52 +01:00
parent 9730cdb880
commit 70160468c0
3 changed files with 9 additions and 5 deletions

View File

@ -67,17 +67,17 @@ public final class CommandUtils {
public static boolean checkPlayerExistence(CommandSender sender, String playerName, McMMOPlayer mcMMOPlayer) {
if (mcMMOPlayer != null) {
return false;
return true;
}
PlayerProfile playerProfile = new PlayerProfile(playerName, false);
if (unloadedProfile(sender, playerProfile)) {
return true;
return false;
}
sender.sendMessage(LocaleLoader.getString("Commands.Offline"));
return true;
return false;
}
public static boolean unloadedProfile(CommandSender sender, PlayerProfile profile) {