mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-29 14:56:43 +00:00
Move Plex to API-driven plugin and fix NoClassDefFoundError on startup
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
package dev.plex.command.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* Storage for a command's parameters
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface CommandParameters
|
||||
{
|
||||
/**
|
||||
* The name
|
||||
*
|
||||
* @return Name of the command
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* The description
|
||||
*
|
||||
* @return Description of the command
|
||||
*/
|
||||
String description() default "";
|
||||
|
||||
/**
|
||||
* The usage (optional)
|
||||
*
|
||||
* @return The usage of the command
|
||||
*/
|
||||
String usage() default "/<command>";
|
||||
|
||||
/**
|
||||
* The aliases (optional)
|
||||
*
|
||||
* @return The aliases of the command
|
||||
*/
|
||||
String aliases() default "";
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package dev.plex.command.annotation;
|
||||
|
||||
import dev.plex.command.source.RequiredCommandSource;
|
||||
import dev.plex.rank.enums.Rank;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* Storage for the command's permissions
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface CommandPermissions
|
||||
{
|
||||
/**
|
||||
* Minimum rank required
|
||||
*
|
||||
* @return Minimum rank required for the command
|
||||
* @see Rank
|
||||
*/
|
||||
Rank level() default Rank.IMPOSTOR;
|
||||
|
||||
/**
|
||||
* Required command source
|
||||
*
|
||||
* @return The required command source of the command
|
||||
* @see RequiredCommandSource
|
||||
*/
|
||||
RequiredCommandSource source() default RequiredCommandSource.ANY;
|
||||
|
||||
/**
|
||||
* The permission
|
||||
*
|
||||
* @return Permission of the command
|
||||
*/
|
||||
String permission() default ""; // No idea what to put here
|
||||
}
|
12
server/src/main/java/dev/plex/command/annotation/System.java
Normal file
12
server/src/main/java/dev/plex/command/annotation/System.java
Normal file
@ -0,0 +1,12 @@
|
||||
package dev.plex.command.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface System
|
||||
{
|
||||
String value() default "";
|
||||
|
||||
boolean debug() default false;
|
||||
}
|
Reference in New Issue
Block a user