Add @since and CHANGELOG.md entry for flag permissions
This commit is contained in:
parent
87a28b135b
commit
3e28cc3191
4 changed files with 5 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Kotlin: Support for suspending command functions using `AnnotationParser<C>.installCoroutineSupport()`
|
- Kotlin: Support for suspending command functions using `AnnotationParser<C>.installCoroutineSupport()`
|
||||||
|
- Flags can be bound to a permission
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Added `executeFuture` to `CommandExecutionHandler` which is now used internally. By default, this delegates to the old
|
- Added `executeFuture` to `CommandExecutionHandler` which is now used internally. By default, this delegates to the old
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ public @interface Flag {
|
||||||
* The flag permission
|
* The flag permission
|
||||||
*
|
*
|
||||||
* @return Flag permission
|
* @return Flag permission
|
||||||
|
* @since 1.6.0
|
||||||
*/
|
*/
|
||||||
@NonNull String permission() default "";
|
@NonNull String permission() default "";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ public final class CommandFlag<T> {
|
||||||
* Get the command permission, if it exists
|
* Get the command permission, if it exists
|
||||||
*
|
*
|
||||||
* @return Command permission, or {@code null}
|
* @return Command permission, or {@code null}
|
||||||
|
* @since 1.6.0
|
||||||
*/
|
*/
|
||||||
public CommandPermission getCommandPermission() {
|
public CommandPermission getCommandPermission() {
|
||||||
return this.permission;
|
return this.permission;
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ public final class CommandContext<C> {
|
||||||
*
|
*
|
||||||
* @param permission The permission
|
* @param permission The permission
|
||||||
* @return Command sender
|
* @return Command sender
|
||||||
|
* @since 1.6.0
|
||||||
*/
|
*/
|
||||||
public boolean hasPermission(final @NonNull CommandPermission permission) {
|
public boolean hasPermission(final @NonNull CommandPermission permission) {
|
||||||
return this.commandManager.hasPermission(this.commandSender, permission);
|
return this.commandManager.hasPermission(this.commandSender, permission);
|
||||||
|
|
@ -168,6 +169,7 @@ public final class CommandContext<C> {
|
||||||
*
|
*
|
||||||
* @param permission The permission
|
* @param permission The permission
|
||||||
* @return Command sender
|
* @return Command sender
|
||||||
|
* @since 1.6.0
|
||||||
*/
|
*/
|
||||||
public boolean hasPermission(final @NonNull String permission) {
|
public boolean hasPermission(final @NonNull String permission) {
|
||||||
return this.commandManager.hasPermission(this.commandSender, permission);
|
return this.commandManager.hasPermission(this.commandSender, permission);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue