🎨 Create separate annotation for command permissions
This allows for compound annotation creation. Though this will need additional changes made to the annotation parser to actually take effect.
This commit is contained in:
parent
a8b2b9a608
commit
0fefd40812
3 changed files with 50 additions and 9 deletions
|
|
@ -203,8 +203,11 @@ public final class AnnotationParser<C> {
|
|||
break;
|
||||
}
|
||||
}
|
||||
/* Decorate command data */
|
||||
builder = builder.withPermission(commandMethod.permission());
|
||||
|
||||
if (method.isAnnotationPresent(CommandPermission.class)) {
|
||||
builder = builder.withPermission(method.getAnnotation(CommandPermission.class).value());
|
||||
}
|
||||
|
||||
if (commandMethod.requiredSender() != Object.class) {
|
||||
builder = builder.withSenderType(commandMethod.requiredSender());
|
||||
} else if (senderType != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue