Skip to content

Commit

Permalink
Optimized Command Permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigerpanzer02 committed Jul 10, 2024
1 parent ba166b0 commit c3b0aa2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
if(argument.getArgumentName().equalsIgnoreCase(args[0])) {
boolean gotPermissions = false;
for(String perm : argument.getPermissions()) {
if(perm.isEmpty()) {
continue;
}
if(plugin.getBukkitHelper().hasPermission(sender, perm)) {
if(perm.isEmpty() || plugin.getBukkitHelper().hasPermission(sender, perm)) {
gotPermissions = true;
}
}
Expand Down

0 comments on commit c3b0aa2

Please sign in to comment.