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 dcb1e15fb..98b3684da 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyJoinCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyJoinCommand.java @@ -5,8 +5,8 @@ import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.datatypes.McMMOPlayer; -import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.PartyManager; @@ -70,14 +70,12 @@ public class PartyJoinCommand implements CommandExecutor { mcMMOTarget = Users.getPlayer(targetName); if (mcMMOTarget == null) { - PlayerProfile playerProfile = new PlayerProfile(targetName, false); - - if (!playerProfile.isLoaded()) { - sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist")); + if (!mcMMO.p.getServer().getOfflinePlayer(targetName).isOnline()) { + sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName)); return false; } - sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName)); + sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist")); return false; }