2021-01-03 07:21:15 +00:00
|
|
|
package dev.plex.command.annotation;
|
2020-10-31 04:51:22 +00:00
|
|
|
|
2021-01-03 07:21:15 +00:00
|
|
|
import dev.plex.command.source.RequiredCommandSource;
|
|
|
|
import dev.plex.rank.enums.Rank;
|
2022-01-04 03:04:39 +00:00
|
|
|
import java.lang.annotation.Retention;
|
|
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
|
2022-02-05 23:14:23 +00:00
|
|
|
/**
|
|
|
|
* Storage for the command's permissions
|
|
|
|
*/
|
2020-10-31 04:51:22 +00:00
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
public @interface CommandPermissions
|
|
|
|
{
|
2022-02-05 23:14:23 +00:00
|
|
|
/**
|
|
|
|
* Minimum rank required
|
2022-02-07 05:59:26 +00:00
|
|
|
*
|
2022-02-05 23:14:23 +00:00
|
|
|
* @return Minimum rank required for the command
|
|
|
|
* @see Rank
|
|
|
|
*/
|
2020-10-31 04:51:22 +00:00
|
|
|
Rank level() default Rank.IMPOSTOR;
|
2020-11-06 01:29:38 +00:00
|
|
|
|
2022-02-05 23:14:23 +00:00
|
|
|
/**
|
|
|
|
* Required command source
|
2022-02-07 05:59:26 +00:00
|
|
|
*
|
2022-02-05 23:14:23 +00:00
|
|
|
* @return The required command source of the command
|
|
|
|
* @see RequiredCommandSource
|
|
|
|
*/
|
2020-11-02 00:06:08 +00:00
|
|
|
RequiredCommandSource source() default RequiredCommandSource.ANY;
|
2022-01-29 22:35:48 +00:00
|
|
|
|
2022-02-05 23:14:23 +00:00
|
|
|
/**
|
|
|
|
* The permission
|
2022-02-07 05:59:26 +00:00
|
|
|
*
|
2022-02-05 23:14:23 +00:00
|
|
|
* @return Permission of the command
|
|
|
|
*/
|
2022-01-30 01:31:10 +00:00
|
|
|
String permission() default ""; // No idea what to put here
|
2020-10-31 04:51:22 +00:00
|
|
|
}
|