mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +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;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -43,12 +44,12 @@ public class PartyInfoCommand implements CommandExecutor {
|
|||||||
StringBuilder memberList = new StringBuilder();
|
StringBuilder memberList = new StringBuilder();
|
||||||
|
|
||||||
for (String memberName : playerParty.getMembers()) {
|
for (String memberName : playerParty.getMembers()) {
|
||||||
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberName);
|
||||||
|
|
||||||
if (playerParty.getLeader().equalsIgnoreCase(memberName)) {
|
if (playerParty.getLeader().equalsIgnoreCase(memberName)) {
|
||||||
memberList.append(ChatColor.GOLD);
|
memberList.append(ChatColor.GOLD);
|
||||||
}
|
}
|
||||||
else if (member != null) {
|
else if (member.isOnline()) {
|
||||||
memberList.append(ChatColor.WHITE);
|
memberList.append(ChatColor.WHITE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -22,7 +22,7 @@ public class PartyKickCommand implements CommandExecutor {
|
|||||||
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
||||||
|
|
||||||
if (!playerParty.getMembers().contains(target.getName())) {
|
if (!playerParty.getMembers().contains(target.getName())) {
|
||||||
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", args[1]));
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,14 +67,14 @@ public class Party {
|
|||||||
return onlineMembers;
|
return onlineMembers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLeader() {
|
|
||||||
return leader;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLeader() {
|
||||||
|
return leader;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user