From 22090907835ee802d39c1c8654807175e9b0430c Mon Sep 17 00:00:00 2001 From: Tibo442 Date: Tue, 30 Dec 2014 12:03:09 +0100 Subject: [PATCH] Different message for own faction and for other factions when faction not found. Still weird for faction-less players to do /f show --- src/main/java/com/massivecraft/factions/cmd/CmdShow.java | 5 +++-- src/main/java/com/massivecraft/factions/zcore/util/TL.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdShow.java b/src/main/java/com/massivecraft/factions/cmd/CmdShow.java index 231ed794..898c0992 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdShow.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdShow.java @@ -37,13 +37,14 @@ public class CmdShow extends FCommand { Faction faction = myFaction; if (this.argIsSet(0)) { faction = this.argAsFaction(0); - if (faction == null) { + if (faction == null || faction.isNone()) { + msg(TL.COMMAND_SHOW_NOFACTION_OTHER); return; } } if (faction.isNone()) { - msg(TL.COMMAND_SHOW_NOFACTION); + msg(TL.COMMAND_SHOW_NOFACTION_SELF); 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 9764d56a..bc274475 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java @@ -343,7 +343,8 @@ public enum TL { COMMAND_SETHOME_SET("%s set the home for your faction. You can now use:"), COMMAND_SETHOME_SETOTHER("You have set the home for the %s faction."), - COMMAND_SHOW_NOFACTION("You are not in a faction"), + COMMAND_SHOW_NOFACTION_SELF("You are not in a faction"), + COMMAND_SHOW_NOFACTION_OTHER("That's not a faction"), COMMAND_SHOW_TOSHOW("to show faction information"), COMMAND_SHOW_FORSHOW("for showing faction information"), COMMAND_SHOW_DESCRIPTION("Description: %s"),