Fix NPE on PartyJoin - Fixes #653

This commit is contained in:
GJ 2013-02-08 13:16:12 -05:00
parent 794071efb8
commit 9c0518f251

View File

@ -76,15 +76,13 @@ public class PartyJoinCommand implements CommandExecutor {
sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist")); sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist"));
return false; return false;
} }
}
target = mcMMOTarget.getPlayer();
if (!target.isOnline()) {
sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName)); sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName));
return false; return false;
} }
target = mcMMOTarget.getPlayer();
if (!mcMMOTarget.inParty()) { if (!mcMMOTarget.inParty()) {
sender.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName)); sender.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName));
return false; return false;