From 2955370c9e525dfd6a673bedbe75559fa44f0144 Mon Sep 17 00:00:00 2001 From: eueln Date: Sat, 10 Jan 2015 11:32:56 -0600 Subject: [PATCH] Fix misleading error in CmdKick The error was shown to a player when s/he tried to kick someone who didn't belong to a faction, and incorrectly asserted that something had "went wrong". --- src/main/java/com/massivecraft/factions/cmd/CmdKick.java | 5 ++--- src/main/java/com/massivecraft/factions/zcore/util/TL.java | 2 +- src/main/resources/lang/en_US.yml | 2 +- src/main/resources/lang/ja_JP.yml | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdKick.java b/src/main/java/com/massivecraft/factions/cmd/CmdKick.java index b56efe5a..dba81901 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdKick.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdKick.java @@ -58,9 +58,8 @@ public class CmdKick extends FCommand { Faction toKickFaction = toKick.getFaction(); - // The PlayerEntityCollection only holds online players, this was a specific issue that kept happening. - if (toKickFaction.getTag().equalsIgnoreCase(TL.WILDERNESS.toString())) { - sender.sendMessage(TL.COMMAND_KICK_OFFLINE.toString()); + if (toKickFaction.isNone()) { + sender.sendMessage(TL.COMMAND_KICK_NONE.toString()); return; } diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TL.java b/src/main/java/com/massivecraft/factions/zcore/util/TL.java index bfe0bff6..5b3dcd5a 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java @@ -227,7 +227,7 @@ public enum TL { COMMAND_KICK_CANDIDATES("Players you can kick: "), COMMAND_KICK_CLICKTOKICK("Click to kick "), COMMAND_KICK_SELF("You cannot kick yourself."), - COMMAND_KICK_OFFLINE("Something went wrong with getting the offline player's faction."), + COMMAND_KICK_NONE("That player is not in a faction."), COMMAND_KICK_NOTMEMBER("%s is not a member of %s"), COMMAND_KICK_INSUFFICIENTRANK("Your rank is too low to kick this player."), COMMAND_KICK_NEGATIVEPOWER("You cannot kick that member until their power is positive."), diff --git a/src/main/resources/lang/en_US.yml b/src/main/resources/lang/en_US.yml index 981673cb..afa726ec 100644 --- a/src/main/resources/lang/en_US.yml +++ b/src/main/resources/lang/en_US.yml @@ -208,7 +208,7 @@ COMMAND: CANDIDATES: 'Players you can kick: ' CLICKTOKICK: 'Click to kick ' SELF: You cannot kick yourself. - OFFLINE: Something went wrong with getting the offline player's faction. + NONE: That player is not in a faction. NOTMEMBER: '%s is not a member of %s' INSUFFICIENTRANK: Your rank is too low to kick this player. NEGATIVEPOWER: You cannot kick that member until their power is positive. diff --git a/src/main/resources/lang/ja_JP.yml b/src/main/resources/lang/ja_JP.yml index 9ed0c553..7fc0bba8 100644 --- a/src/main/resources/lang/ja_JP.yml +++ b/src/main/resources/lang/ja_JP.yml @@ -207,7 +207,7 @@ COMMAND: CANDIDATES: 'Players you can kick: ' CLICKTOKICK: 'Click to kick ' SELF: You cannot kick yourself. - OFFLINE: Something went wrong with getting the offline player's faction. + NONE: That player is not in a faction. NOTMEMBER: '%s is not a member of %s' INSUFFICIENTRANK: Your rank is too low to kick this player. NEGATIVEPOWER: You cannot kick that member until their power is positive.