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

33 lines
844 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;
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
* @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
* @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
* @return Permission of the command
*/
String permission() default ""; // No idea what to put here
2020-10-31 04:51:22 +00:00
}