From 9c0518f25155d79971b34c829aa8b2e0d0ed3958 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 8 Feb 2013 13:16:12 -0500 Subject: [PATCH] Fix NPE on PartyJoin - Fixes #653 --- .../com/gmail/nossr50/party/commands/PartyJoinCommand.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyJoinCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyJoinCommand.java index 092bac578..dcb1e15fb 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyJoinCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyJoinCommand.java @@ -76,15 +76,13 @@ public class PartyJoinCommand implements CommandExecutor { sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist")); return false; } - } - target = mcMMOTarget.getPlayer(); - - if (!target.isOnline()) { sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName)); return false; } + target = mcMMOTarget.getPlayer(); + if (!mcMMOTarget.inParty()) { sender.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName)); return false;