diff options
author | Alexander Schepp <schneeleo@gmail.com> | 2012-10-01 09:34:49 -0700 |
---|---|---|
committer | Alexander Schepp <schneeleo@gmail.com> | 2012-10-01 09:34:49 -0700 |
commit | 0dd0dba33837ce73f784704f893848aa9d7282e9 (patch) | |
tree | 1bd0979d2e512b71c20e22a522a881da042d60df | |
parent | 678ae787678f4b4a68b5460c80fba5f77cdee6d2 (diff) | |
parent | 2671f399513690c234c9c0d681e6bb09d358d028 (diff) | |
download | Essentials-0dd0dba33837ce73f784704f893848aa9d7282e9.tar Essentials-0dd0dba33837ce73f784704f893848aa9d7282e9.tar.gz Essentials-0dd0dba33837ce73f784704f893848aa9d7282e9.tar.lz Essentials-0dd0dba33837ce73f784704f893848aa9d7282e9.tar.xz Essentials-0dd0dba33837ce73f784704f893848aa9d7282e9.zip |
Merge pull request #165 from chrisgward/patch-2
Adding say command to sudo to fake chat
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandsudo.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java index 89cfe2438..d41cf9a51 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java @@ -27,6 +27,15 @@ public class Commandsudo extends EssentialsCommand } final User user = getPlayer(server, args, 0, false); + if(args[1].equalsIgnoreCase("say")) + { + if (user.isAuthorized("essentials.sudo.exempt")) + { + throw new Exception(_("sudoExempt")); + } + user.chat(getFinalArg(args, 2)); + return; + } final String command = args[1]; final String[] arguments = new String[args.length - 2]; if (arguments.length > 0) |