summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-19 00:09:30 +0200
committersnowleo <schneeleo@gmail.com>2011-07-19 00:09:30 +0200
commit548666b79b0bcdd24443f7bfc1cea43cdcc2a851 (patch)
tree013871fba47d1e030a49df3acc95be3d515f0f0d
parent6dbb5bc605c6fcae709e8260e442d8023b02c6cb (diff)
downloadEssentials-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.java14
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;
}