Add perms for uu/enable/disable/toggle

This commit is contained in:
Jesse Boyd 2019-04-16 12:37:28 +10:00
parent cd4d0f7725
commit 79f72b64ac
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 4 additions and 4 deletions

View File

@ -85,19 +85,19 @@ public class VoxelSniperCommand extends VoxelCommand
player.sendMessage(PerformerE.performer_list_long);
return true;
}
else if (args[0].equalsIgnoreCase("enable"))
else if (args[0].equalsIgnoreCase("enable") && player.hasPermission("voxelsniper.command.vs.enable"))
{
sniper.setEnabled(true);
player.sendMessage("VoxelSniper is " + (sniper.isEnabled() ? "enabled" : "disabled"));
return true;
}
else if (args[0].equalsIgnoreCase("disable"))
else if (args[0].equalsIgnoreCase("disable") && player.hasPermission("voxelsniper.command.vs.enable"))
{
sniper.setEnabled(false);
player.sendMessage("VoxelSniper is " + (sniper.isEnabled() ? "enabled" : "disabled"));
return true;
}
else if (args[0].equalsIgnoreCase("toggle"))
else if (args[0].equalsIgnoreCase("toggle") && player.hasPermission("voxelsniper.command.vs.enable"))
{
sniper.setEnabled(!sniper.isEnabled());
player.sendMessage("VoxelSniper is " + (sniper.isEnabled() ? "enabled" : "disabled"));

View File

@ -11,7 +11,7 @@ public class VoxelUndoCommand extends VoxelCommand
{
super("VoxelUndo", plugin);
setIdentifier("u");
setPermission("voxelsniper.sniper");
setPermission("voxelsniper.command.uu");
}
@Override