From 6eb255632fac6a19b47b35f26a70ee1e5732d090 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Mon, 30 Sep 2013 10:24:36 +0200 Subject: [PATCH] Clean this up a little bit --- .../gmail/nossr50/commands/party/PartyInfoCommand.java | 5 +++-- .../gmail/nossr50/commands/party/PartyKickCommand.java | 2 +- .../java/com/gmail/nossr50/datatypes/party/Party.java | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java index 0ec4cbc14..e01427628 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PartyInfoCommand.java @@ -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 { diff --git a/src/main/java/com/gmail/nossr50/commands/party/PartyKickCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PartyKickCommand.java index 2968dfcd0..c421408bf 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PartyKickCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PartyKickCommand.java @@ -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; } diff --git a/src/main/java/com/gmail/nossr50/datatypes/party/Party.java b/src/main/java/com/gmail/nossr50/datatypes/party/Party.java index b2f61293a..2b7bee53e 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/party/Party.java +++ b/src/main/java/com/gmail/nossr50/datatypes/party/Party.java @@ -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; }