Mute and sudo should check for essentials.vanish.interact permission.

This commit is contained in:
KHobbits 2013-06-02 16:09:56 +01:00
parent 55cee73a48
commit 43f4a69760
3 changed files with 5 additions and 9 deletions

View File

@ -19,14 +19,10 @@ public class Commandgetpos extends EssentialsCommand
{
if (args.length > 0 && user.isAuthorized("essentials.getpos.others"))
{
final User otherUser = getPlayer(server, args, 0, true, false);
if (!otherUser.isHidden() || user.isAuthorized("essentials.vanish.interact"))
{
final User otherUser = getPlayer(server, user, args, 0);
outputPosition(user, otherUser.getLocation(), user.getLocation());
return;
}
}
outputPosition(user, user.getLocation(), null);
}

View File

@ -23,7 +23,7 @@ public class Commandmute extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
final User player = getPlayer(server, args, 0, true, true);
final User player = getPlayer(server, sender, args, 0);
if (sender instanceof Player && !player.isMuted() && player.isAuthorized("essentials.mute.exempt"))
{
throw new Exception(_("muteExempt"));

View File

@ -27,7 +27,7 @@ public class Commandsudo extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
final User user = getPlayer(server, args, 0, true, false);
final User user = getPlayer(server, sender, args, 0);
if(args[1].toLowerCase(Locale.ENGLISH).startsWith("c:"))
{
if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player)