mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 12:23:59 +00:00
Merge pull request #171 from chrisgward/patch-5
Adding console override to sudo chat
This commit is contained in:
commit
227cde75a7
1 changed files with 3 additions and 3 deletions
|
@ -27,13 +27,13 @@ public class Commandsudo extends EssentialsCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
final User user = getPlayer(server, args, 0, false);
|
final User user = getPlayer(server, args, 0, false);
|
||||||
if(args[1].equalsIgnoreCase("say"))
|
if(args[1].toLowerCase().startsWith("c:"))
|
||||||
{
|
{
|
||||||
if (user.isAuthorized("essentials.sudo.exempt"))
|
if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player)
|
||||||
{
|
{
|
||||||
throw new Exception(_("sudoExempt"));
|
throw new Exception(_("sudoExempt"));
|
||||||
}
|
}
|
||||||
user.chat(getFinalArg(args, 2));
|
user.chat(getFinalArg(args, 1).substring(2));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final String command = args[1];
|
final String command = args[1];
|
||||||
|
|
Loading…
Reference in a new issue