[Permission] essentials.vanish.interact - Players with this permission will be able to interact with hidden players.

This commit is contained in:
KHobbits 2013-03-20 01:00:50 +00:00
parent 896e14670f
commit 889157371c
12 changed files with 40 additions and 29 deletions

View file

@ -41,12 +41,13 @@ public class Commandext extends EssentialsCommand
private void extinguishPlayers(final Server server, final CommandSender sender, final String name) throws Exception
{
boolean skipHidden = sender instanceof Player && !ess.getUser(sender).isAuthorized("essentials.vanish.interact");
boolean foundUser = false;
final List<Player> matchedPlayers = server.matchPlayer(name);
for (Player matchPlayer : matchedPlayers)
{
final User player = ess.getUser(matchPlayer);
if (player.isHidden())
if (skipHidden && player.isHidden())
{
continue;
}