Skip to content

Commit

Permalink
Fix permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelillo15 committed Aug 27, 2024
1 parent a378a8f commit 9056105
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void onCommand(@NotNull CommandSender sender, @NotNull String label, @Not

Command command = optionalCommand.get();

if (command.getCommandData().permission() != null && !sender.hasPermission(command.getCommandData().permission())) {
if (!command.getCommandData().permission().isEmpty() && !sender.hasPermission(command.getCommandData().permission())) {
sender.sendMiniMessage(getNoPermissionMessage());
return;
}
Expand Down

0 comments on commit 9056105

Please sign in to comment.