Add @since and CHANGELOG.md entry for flag permissions

This commit is contained in:
Frank van der Heijden 2021-07-31 12:32:47 +02:00 committed by Jason
parent 87a28b135b
commit 3e28cc3191
4 changed files with 5 additions and 0 deletions

View file

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Kotlin: Support for suspending command functions using `AnnotationParser<C>.installCoroutineSupport()`
- Flags can be bound to a permission
### Changed
- Added `executeFuture` to `CommandExecutionHandler` which is now used internally. By default, this delegates to the old

View file

@ -92,6 +92,7 @@ public @interface Flag {
* The flag permission
*
* @return Flag permission
* @since 1.6.0
*/
@NonNull String permission() default "";

View file

@ -134,6 +134,7 @@ public final class CommandFlag<T> {
* Get the command permission, if it exists
*
* @return Command permission, or {@code null}
* @since 1.6.0
*/
public CommandPermission getCommandPermission() {
return this.permission;

View file

@ -158,6 +158,7 @@ public final class CommandContext<C> {
*
* @param permission The permission
* @return Command sender
* @since 1.6.0
*/
public boolean hasPermission(final @NonNull CommandPermission permission) {
return this.commandManager.hasPermission(this.commandSender, permission);
@ -168,6 +169,7 @@ public final class CommandContext<C> {
*
* @param permission The permission
* @return Command sender
* @since 1.6.0
*/
public boolean hasPermission(final @NonNull String permission) {
return this.commandManager.hasPermission(this.commandSender, permission);