mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-11 17:15:07 +02:00
New Permission: essentials.sudo.exempt
If a user has this perm, they cannot be controlled.
This commit is contained in:
@@ -30,7 +30,13 @@ public class Commandsudo extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Translate this.
|
//TODO: Translate this.
|
||||||
sender.sendMessage("Running the command as " + user.getDisplayName());
|
if (user.isAuthorized("essentials.sudo.exempt"))
|
||||||
|
{
|
||||||
|
throw new Exception("You cannot sudo this user");
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: Translate this.
|
||||||
|
sender.sendMessage("Forcing " + user.getDisplayName() + " to run: /" + command + " " + arguments);
|
||||||
|
|
||||||
final PluginCommand execCommand = ess.getServer().getPluginCommand(command);
|
final PluginCommand execCommand = ess.getServer().getPluginCommand(command);
|
||||||
if (execCommand != null)
|
if (execCommand != null)
|
||||||
|
Reference in New Issue
Block a user