Add perms for uu/enable/disable/toggle

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-16 12:37:28 +10:00
Ursprung cd4d0f7725
Commit 79f72b64ac
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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