diff options
author | snowleo <schneeleo@gmail.com> | 2011-07-19 00:09:30 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-07-19 00:09:30 +0200 |
commit | 548666b79b0bcdd24443f7bfc1cea43cdcc2a851 (patch) | |
tree | 013871fba47d1e030a49df3acc95be3d515f0f0d | |
parent | 6dbb5bc605c6fcae709e8260e442d8023b02c6cb (diff) | |
download | Essentials-548666b79b0bcdd24443f7bfc1cea43cdcc2a851.tar Essentials-548666b79b0bcdd24443f7bfc1cea43cdcc2a851.tar.gz Essentials-548666b79b0bcdd24443f7bfc1cea43cdcc2a851.tar.lz Essentials-548666b79b0bcdd24443f7bfc1cea43cdcc2a851.tar.xz Essentials-548666b79b0bcdd24443f7bfc1cea43cdcc2a851.zip |
show hidden for /whois
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandwhois.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 9b5d172f2..ef815dd87 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -22,13 +22,25 @@ public class Commandwhois extends EssentialsCommand { throw new NotEnoughArgumentsException(); } + boolean showhidden = false; + if (sender instanceof Player) + { + if (ess.getUser(sender).isAuthorized("essentials.list.hidden")) + { + showhidden = true; + } + } + else + { + showhidden = true; + } String whois = args[0].toLowerCase(); charge(sender); int prefixLength = ChatColor.stripColor(ess.getSettings().getNicknamePrefix()).length(); for (Player p : server.getOnlinePlayers()) { User u = ess.getUser(p); - if (u.isHidden()) + if (u.isHidden() && !showhidden) { continue; } |