mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01:00
show hidden for /whois
This commit is contained in:
parent
6dbb5bc605
commit
548666b79b
@ -22,13 +22,25 @@ public class Commandwhois extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
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();
|
String whois = args[0].toLowerCase();
|
||||||
charge(sender);
|
charge(sender);
|
||||||
int prefixLength = ChatColor.stripColor(ess.getSettings().getNicknamePrefix()).length();
|
int prefixLength = ChatColor.stripColor(ess.getSettings().getNicknamePrefix()).length();
|
||||||
for (Player p : server.getOnlinePlayers())
|
for (Player p : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
User u = ess.getUser(p);
|
User u = ess.getUser(p);
|
||||||
if (u.isHidden())
|
if (u.isHidden() && !showhidden)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user