Skip to content

Commit

Permalink
Fix craftreport permissions (#629)
Browse files Browse the repository at this point in the history
* Attempt fix

* Fix remaining issues
  • Loading branch information
TylerS1066 authored Mar 10, 2024
1 parent 868213e commit 774013a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public boolean onCommand(CommandSender commandSender, Command command, String s,
if (commandSender.getName().equalsIgnoreCase("craftreport"))
return false;
if (!commandSender.hasPermission("movecraft.commands")
&& !commandSender.hasPermission("movecraft.commands.craftreport")) {
|| !commandSender.hasPermission("movecraft.commands.craftreport")) {
commandSender.sendMessage(MOVECRAFT_COMMAND_PREFIX
+ I18nSupport.getInternationalisedString("Insufficient Permissions"));
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public boolean onCommand(CommandSender commandSender, Command command, String s,
return false;

if (!commandSender.hasPermission("movecraft.commands")
&& !commandSender.hasPermission("movecraft.commands.release")) {
|| !commandSender.hasPermission("movecraft.commands.release")) {
commandSender.sendMessage(MOVECRAFT_COMMAND_PREFIX
+ I18nSupport.getInternationalisedString("Insufficient Permissions"));
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public boolean onCommand(CommandSender commandSender, Command command, String s,
return true;
}
if (args[0].equalsIgnoreCase("left")) {
if (!player.hasPermission("movecraft.commands") && !player.hasPermission("movecraft.commands.rotateleft")) {
if (!player.hasPermission("movecraft.commands") || !player.hasPermission("movecraft.commands.rotateleft")) {
player.sendMessage(MOVECRAFT_COMMAND_PREFIX + I18nSupport.getInternationalisedString("Insufficient Permissions"));
return true;
}
Expand All @@ -50,7 +50,7 @@ public boolean onCommand(CommandSender commandSender, Command command, String s,
}

if (args[0].equalsIgnoreCase("right")) {
if (!player.hasPermission("movecraft.commands") && !player.hasPermission("movecraft.commands.rotateright")) {
if (!player.hasPermission("movecraft.commands") || !player.hasPermission("movecraft.commands.rotateright")) {
player.sendMessage(MOVECRAFT_COMMAND_PREFIX + I18nSupport.getInternationalisedString("Insufficient Permissions"));
return true;
}
Expand Down

0 comments on commit 774013a

Please sign in to comment.