mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-27 17:09:43 +00:00
Mute and sudo should check for essentials.vanish.interact permission.
This commit is contained in:
parent
55cee73a48
commit
43f4a69760
3 changed files with 5 additions and 9 deletions
|
@ -19,13 +19,9 @@ public class Commandgetpos extends EssentialsCommand
|
||||||
{
|
{
|
||||||
if (args.length > 0 && user.isAuthorized("essentials.getpos.others"))
|
if (args.length > 0 && user.isAuthorized("essentials.getpos.others"))
|
||||||
{
|
{
|
||||||
final User otherUser = getPlayer(server, args, 0, true, false);
|
final User otherUser = getPlayer(server, user, args, 0);
|
||||||
if (!otherUser.isHidden() || user.isAuthorized("essentials.vanish.interact"))
|
outputPosition(user, otherUser.getLocation(), user.getLocation());
|
||||||
{
|
return;
|
||||||
outputPosition(user, otherUser.getLocation(), user.getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
outputPosition(user, user.getLocation(), null);
|
outputPosition(user, user.getLocation(), null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class Commandmute extends EssentialsCommand
|
||||||
throw new NotEnoughArgumentsException();
|
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"))
|
if (sender instanceof Player && !player.isMuted() && player.isAuthorized("essentials.mute.exempt"))
|
||||||
{
|
{
|
||||||
throw new Exception(_("muteExempt"));
|
throw new Exception(_("muteExempt"));
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class Commandsudo extends EssentialsCommand
|
||||||
throw new NotEnoughArgumentsException();
|
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(args[1].toLowerCase(Locale.ENGLISH).startsWith("c:"))
|
||||||
{
|
{
|
||||||
if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player)
|
if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player)
|
||||||
|
|
Loading…
Reference in a new issue