Annotation And Sub Command

Annotation

Here's the annotation of command

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Commander {

    String name(); // command name (compulsory)

    String description(); //command description (compulsory)

    boolean playerOnly() default false; // command is only player

    String permission() default ""; // command permission

    String[] alias() default {}; // command alias

}

Sub Command Structure

With this framework, create infinity sub commands are extremely easy.

最后更新于