mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +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.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user