This is less costly.

This commit is contained in:
GJ 2013-02-08 13:27:28 -05:00
parent 9c0518f251
commit a424d36e96

View File

@ -5,8 +5,8 @@ import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.datatypes.McMMOPlayer; import com.gmail.nossr50.datatypes.McMMOPlayer;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.Party;
import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.party.PartyManager;
@ -70,14 +70,12 @@ public class PartyJoinCommand implements CommandExecutor {
mcMMOTarget = Users.getPlayer(targetName); mcMMOTarget = Users.getPlayer(targetName);
if (mcMMOTarget == null) { if (mcMMOTarget == null) {
PlayerProfile playerProfile = new PlayerProfile(targetName, false); if (!mcMMO.p.getServer().getOfflinePlayer(targetName).isOnline()) {
sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName));
if (!playerProfile.isLoaded()) {
sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist"));
return false; return false;
} }
sender.sendMessage(LocaleLoader.getString("Party.NotOnline", targetName)); sender.sendMessage(LocaleLoader.getString("Commands.DoesNotExist"));
return false; return false;
} }