Annotation Interface Command
Main class of the framework to create commands in easy way.
- Since:
- 1.0.0
- Author:
- Despical
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAvailable command sender or senders. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]An alternative name list of command.booleanThis option is now deprecated.The description of the command that will be showed when sender executes Bukkit's help command.By default, using the plugin's name as a fallback prefix.intMaximum value of arguments. -1 for infinite.intMinimum value of arguments.booleanOnly op players can execute this command.The permission that sender has to have to execute command.Enum value of command sender type to define who will use the command.The usage of the command that will be showed when sender executes command without required or missing arguments.
-
Element Details
-
name
String nameThe name of the command. If command would be a sub command then sub command's name must be separated by dot. For example like the"command.subcommand"- Returns:
- name of the command or subcommand
-
fallbackPrefix
String fallbackPrefixBy default, using the plugin's name as a fallback prefix.- Returns:
- a prefix which is prepended to the command with a ':' one or more times to make the command unique.
- Default:
""
-
permission
String permissionThe permission that sender has to have to execute command.- Returns:
- name of the permission
- Default:
""
-
aliases
String[] aliasesAn alternative name list of command. Checkname()to understand how command names work.- Returns:
- aliases list of the command
- Default:
{}
-
desc
String descThe description of the command that will be showed when sender executes Bukkit's help command.- Returns:
- description of the command
- Default:
""
-
usage
String usageThe usage of the command that will be showed when sender executes command without required or missing arguments.- Returns:
- usage of the command.
- Default:
""
-
min
int minMinimum value of arguments.- Returns:
- minimum value of arguments.
- Default:
0
-
max
int maxMaximum value of arguments. -1 for infinite.- Returns:
- maximum value of arguments.
- Default:
-1
-
onlyOp
boolean onlyOpOnly op players can execute this command.Permissions will be ignored if this option is enabled.
- Returns:
- allow only op players.
- Default:
false
-
async
boolean asyncThis option is now deprecated. In newer versions of framework a new API will be introduced with additional features.This option makes command to execute in a separate thread but involves HIGH RISKS because the Bukkit API, except the scheduler package, is not thread safe nor guaranteed to be thread safe.
- Returns:
- asynchronous execution of command.
- Default:
false
-
senderType
Command.SenderType senderTypeEnum value of command sender type to define who will use the command.- Returns:
- enum value of
Command.SenderType
- Default:
BOTH
-