✨ Add getters for permission and sender type to Command.Builder
This commit is contained in:
parent
f2f187f58d
commit
79aad9d79a
1 changed files with 24 additions and 0 deletions
|
|
@ -307,6 +307,30 @@ public class Command<C> {
|
|||
this.flags = Objects.requireNonNull(flags, "Flags may not be null");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the required sender type for this builder
|
||||
* <p>
|
||||
* Returns {@code null} when there is not a specific required sender type
|
||||
*
|
||||
* @return required sender type
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public @Nullable Class<? extends C> senderType() {
|
||||
return this.senderType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the required command permission for this builder
|
||||
* <p>
|
||||
* Will return {@link Permission#empty()} if there is no required permission
|
||||
*
|
||||
* @return required permission
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public @NonNull CommandPermission commandPermission() {
|
||||
return this.commandPermission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add command meta to the internal command meta map
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue