Move Plex to API-driven plugin and fix NoClassDefFoundError on startup

This commit is contained in:
Focusvity
2022-04-24 14:16:14 +10:00
parent edeecb51f4
commit f9a577035b
346 changed files with 736 additions and 118 deletions

View File

@ -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 "";
}

View File

@ -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
}

View 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;
}