Skip to content

Commit

Permalink
Fix SubCommandHandler access check
Browse files Browse the repository at this point in the history
  • Loading branch information
xDec0de committed Nov 2, 2024
1 parent 6ec3d64 commit cb9b94e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private String[] removeFirstArgument(@NotNull String[] args) {

private <T> T onUsedCommand(@NotNull MCCommand<P, S> mainCmd, @NotNull S sender, @NotNull String[] args,
@NotNull BiFunction<MCCommand<P, S>, String[], T> action, @NotNull T def, boolean message) {
if (mainCmd.hasAccess(sender, message))
if (!mainCmd.hasAccess(sender, message))
return def;
if (args.length == 0)
return action.apply(mainCmd, args);
Expand Down

0 comments on commit cb9b94e

Please sign in to comment.