From 43f4a697605848bd62fb68f070534aa3e36bf27e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 2 Jun 2013 16:09:56 +0100 Subject: Mute and sudo should check for essentials.vanish.interact permission. --- .../src/com/earth2me/essentials/commands/Commandgetpos.java | 10 +++------- .../src/com/earth2me/essentials/commands/Commandmute.java | 2 +- .../src/com/earth2me/essentials/commands/Commandsudo.java | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java index 99763f4a2..7b652b0a0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgetpos.java @@ -19,13 +19,9 @@ 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")) - { - outputPosition(user, otherUser.getLocation(), user.getLocation()); - return; - } - + final User otherUser = getPlayer(server, user, args, 0); + outputPosition(user, otherUser.getLocation(), user.getLocation()); + return; } outputPosition(user, user.getLocation(), null); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java index def5d95c3..4b376b9a7 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandmute.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandmute.java @@ -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")); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index 2d91657d6..7067eef4a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -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) -- cgit v1.2.3