From a8575bddef2fbcada9303435594b6e510f6cdcd3 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Tue, 2 Oct 2012 01:57:29 +1000 Subject: Adding console overrides to exempts --- Essentials/src/com/earth2me/essentials/commands/Commandban.java | 2 +- Essentials/src/com/earth2me/essentials/commands/Commandsudo.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index 5f70df273..cf6ea53df 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -44,7 +44,7 @@ public class Commandban extends EssentialsCommand } else { - if (user.isAuthorized("essentials.ban.exempt")) + if (user.isAuthorized("essentials.ban.exempt") && sender instanceof Player) { sender.sendMessage(_("banExempt")); return; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index 1d974121b..89cfe2438 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -7,6 +7,7 @@ import java.util.logging.Logger; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.command.PluginCommand; +import org.bukkit.entity.Player; public class Commandsudo extends EssentialsCommand @@ -33,7 +34,7 @@ public class Commandsudo extends EssentialsCommand System.arraycopy(args, 2, arguments, 0, args.length - 2); } - if (user.isAuthorized("essentials.sudo.exempt")) + if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player) { throw new Exception(_("sudoExempt")); } -- cgit v1.2.3