Fix multi-alias flag not checking permissions
This commit is contained in:
parent
d0beddf9eb
commit
87a28b135b
1 changed files with 6 additions and 0 deletions
|
|
@ -355,6 +355,12 @@ public final class FlagArgument<C> extends CommandArgument<C, Object> {
|
|||
FailureReason.DUPLICATE_FLAG,
|
||||
commandContext
|
||||
));
|
||||
} else if (!commandContext.hasPermission(flag.getCommandPermission())) {
|
||||
return ArgumentParseResult.failure(new FlagParseException(
|
||||
string,
|
||||
FailureReason.NO_PERMISSION,
|
||||
commandContext
|
||||
));
|
||||
}
|
||||
parsedFlags.add(flag);
|
||||
commandContext.flags().addPresenceFlag(flag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue