diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdShow.java b/src/main/java/com/massivecraft/factions/cmd/CmdShow.java index b6a2afca..32994657 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdShow.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdShow.java @@ -54,6 +54,12 @@ public class CmdShow extends FCommand { return; } + if (!fme.getPlayer().hasPermission("factions.show.bypassexempt") + && P.p.getConfig().getStringList("show-exempt").contains(faction.getTag())) { + msg(TL.COMMAND_SHOW_EXEMPT); + return; + } + // if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay if (!payForCommand(Conf.econCostShow, TL.COMMAND_SHOW_TOSHOW, TL.COMMAND_SHOW_FORSHOW)) { 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 d101663e..0db20eaa 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java @@ -463,6 +463,7 @@ public enum TL { COMMAND_SHOW_MEMBERSOFFLINE("Members offline: "), COMMAND_SHOW_COMMANDDESCRIPTION("Show faction information"), COMMAND_SHOW_DEATHS_TIL_RAIDABLE("DTR: %1$d"), + COMMAND_SHOW_EXEMPT("This faction is exempt and cannot be seen."), COMMAND_SHOWINVITES_PENDING("Players with pending invites: "), COMMAND_SHOWINVITES_CLICKTOREVOKE("Click to revoke invite for %1$s"), diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 1dfa96f3..f5b76029 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -245,6 +245,11 @@ show: # For a /f show that does not display fancy messages that are essentially empty, use minimal-show minimal-show: false +# Factions that should be exempt from /f show, case sensitive, useful for a +# serverteam faction, since the command shows vanished players otherwise +show-exempt: + - Put_faction_tag_here + ############################################################ # +------------------------------------------------------+ # # | Configurable /f list | # diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index e9ef39be..7df77afd 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -48,6 +48,7 @@ permissions: factions.kick.any: true factions.ownershipbypass: true factions.chatspy: true + factions.show.bypassexempt: true factions.kit.fullplayer: default: true description: Can also create new factions. @@ -231,6 +232,8 @@ permissions: description: set faction home for another faction factions.show: description: show faction information + factions.show.bypassexempt: + description: show exempt faction information factions.tag: description: change the faction tag factions.title: