-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCommandHandler.java
More file actions
90 lines (80 loc) · 1.89 KB
/
CommandHandler.java
File metadata and controls
90 lines (80 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.not2excel.api.command;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Richmond Steele
* @since 12/16/13
* All rights Reserved
* Please read included LICENSE file
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface CommandHandler
{
/**
* Label of the command
* Sub-commands have '.' to split the child from the parent
* /test => test
* /test set => test.set
*
* @return command label
*/
String command();
/**
* Aliases of the command
* /test2 => /test
* /test set2 => /test set
*
* @return command aliases
*/
String[] aliases() default {};
/**
* TopLevel-Aliases of the command
* /test2 => /test
* /test set2 => /set_test
*
* @return command toplevel-aliases
*/
String[] toplevel_aliases() default {};
/**
* Permission to use this command
*
* @return permission
*/
String permission() default "";
/**
* Message to send to CommandSender if they do not have permission to use this command
*
* @return noPermission message
*/
String noPermission() default "You don't have permission to do that.";
/**
* Usage for the command
* /test
* /test set [player]
*
* @return command usage
*/
String usage() default "";
/**
* Description of command
* /test => Testing the dynamic CommandAPI
*
* @return command description
*/
String description() default "";
/**
* Minimum arguments the command must have
* must be > 0
* @return min
*/
int min() default 0;
/**
* Max arguments the command can have
* -1 is unlimited
* @return max
*/
int max() default -1;
}