mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-26 12:45:04 +08:00
5cea728eb7
Additonal stuff: Fixed + refactored help command. Removed 'Usage: ' from all commands. Created 'player.hasPermission(permission)' function. Created default for Usage annotation. Created hashmap version of 'getHandlers' and renamed the original to getHandlersAsList()
26 lines
487 B
Java
26 lines
487 B
Java
package emu.grasscutter.commands;
|
|
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
public @interface Command {
|
|
String label() default "";
|
|
|
|
String usage() default "No usage specified";
|
|
|
|
String description() default "No description specified";
|
|
|
|
String[] aliases() default {};
|
|
|
|
Execution execution() default Execution.ALL;
|
|
|
|
String permission() default "";
|
|
|
|
enum Execution {
|
|
ALL,
|
|
CONSOLE,
|
|
PLAYER
|
|
}
|
|
}
|