Command.java 859 Bytes
Newer Older
Jaida Wu's avatar
Jaida Wu committed
1
2
3
4
5
6
7
8
9
package emu.grasscutter.command;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
public @interface Command {
    String label() default "";

10
    String usage() default "commands.generic.no_usage_specified";
Jaida Wu's avatar
Jaida Wu committed
11

方块君's avatar
方块君 committed
12
    String description() default "commands.generic.no_description_specified";
方块君's avatar
方块君 committed
13

Jaida Wu's avatar
Jaida Wu committed
14
15
16
    String[] aliases() default {};

    String permission() default "";
AnimeGitB's avatar
AnimeGitB committed
17
18
    
    String permissionTargeted() default "";
BaiSugar's avatar
BaiSugar committed
19

20
21
22
23
24
25
26
27
    public enum TargetRequirement {
        NONE,       // targetPlayer is not required
        OFFLINE,    // targetPlayer must be offline
        PLAYER,     // targetPlayer can be online or offline
        ONLINE      // targetPlayer must be online
    }
    TargetRequirement targetRequirement() default TargetRequirement.ONLINE;

BaiSugar's avatar
BaiSugar committed
28
    boolean threading() default false;
Jaida Wu's avatar
Jaida Wu committed
29
}