From a424d36e960f05dc2a928deb99dd297327ae4aff Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 8 Feb 2013 13:27:28 -0500 Subject: [PATCH] This is less costly. --- .../gmail/nossr50/party/commands/PartyJoinCommand.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 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 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; }