Commits vergleichen
1 Commits
master
...
CMDAPIJava
Autor | SHA1 | Datum | |
---|---|---|---|
|
1a44aab54a |
@ -54,8 +54,14 @@ public abstract class AbstractSWCommand<T> {
|
||||
|
||||
protected abstract void createAndSafeCommand(String command, String[] aliases);
|
||||
|
||||
/**
|
||||
* This method should unregister the given command.
|
||||
*/
|
||||
public abstract void unregister();
|
||||
|
||||
/**
|
||||
* This method should register the given command.
|
||||
*/
|
||||
public abstract void register();
|
||||
|
||||
protected void commandSystemError(T sender, CommandFrameworkException e) {
|
||||
@ -284,16 +290,31 @@ public abstract class AbstractSWCommand<T> {
|
||||
return methods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a given method as a command entry point.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.METHOD})
|
||||
@Repeatable(Register.Registeres.class)
|
||||
protected @interface Register {
|
||||
/**
|
||||
* The sub command on which this command entry point should be registered.
|
||||
*/
|
||||
String[] value() default {};
|
||||
|
||||
/**
|
||||
* {@code true} if this is a help command entry.
|
||||
*/
|
||||
boolean help() default false;
|
||||
|
||||
/**
|
||||
* The description messages for this command entry.
|
||||
*/
|
||||
String[] description() default {};
|
||||
|
||||
/**
|
||||
* {@code true} if this command entry should not be tab completed.
|
||||
*/
|
||||
boolean noTabComplete() default false;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren