mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Clean this up a little bit
This commit is contained in:
parent
3a37d0e092
commit
6eb255632f
@ -1,6 +1,7 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -43,12 +44,12 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
StringBuilder memberList = new StringBuilder();
|
||||
|
||||
for (String memberName : playerParty.getMembers()) {
|
||||
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
||||
OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberName);
|
||||
|
||||
if (playerParty.getLeader().equalsIgnoreCase(memberName)) {
|
||||
memberList.append(ChatColor.GOLD);
|
||||
}
|
||||
else if (member != null) {
|
||||
else if (member.isOnline()) {
|
||||
memberList.append(ChatColor.WHITE);
|
||||
}
|
||||
else {
|
||||
|
@ -22,7 +22,7 @@ public class PartyKickCommand implements CommandExecutor {
|
||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
||||
|
||||
if (!playerParty.getMembers().contains(target.getName())) {
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", args[1]));
|
||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -67,14 +67,14 @@ public class Party {
|
||||
return onlineMembers;
|
||||
}
|
||||
|
||||
public String getLeader() {
|
||||
return leader;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getLeader() {
|
||||
return leader;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user