Plex/server/src/main/java/dev/plex/command/annotation/CommandPermissions.java

37 lines
866 B
Java
Raw Normal View History

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;
2023-03-08 20:26:10 +00:00
2022-01-04 03:04:39 +00:00
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Storage for the command's permissions
*/
2020-10-31 04:51:22 +00:00
@Retention(RetentionPolicy.RUNTIME)
public @interface CommandPermissions
{
/**
* Minimum rank required
2022-02-07 05:59:26 +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
/**
* Required command source
2022-02-07 05:59:26 +00:00
*
* @return The required command source of the command
* @see RequiredCommandSource
*/
RequiredCommandSource source() default RequiredCommandSource.ANY;
2022-01-29 22:35:48 +00:00
/**
* The permission
2022-02-07 05:59:26 +00:00
*
* @return Permission of the command
*/
String permission() default ""; // No idea what to put here
2020-10-31 04:51:22 +00:00
}