mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 00:30:07 +01:00
This is less costly.
This commit is contained in:
parent
9c0518f251
commit
a424d36e96
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user