Package net.citizensnpcs.api.command
Annotation Type Command
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionDefines the flags available for this command.A longer description of the command and any flags it uses which will be displayed in addition todesc()
in help commands.int
The maximum number of arguments that the command will accept.int
Minimum number of arguments that are accepted by the command.String[]
The argument modifiers accepted by the command.boolean
Whether to parse placeholders from the input command.The permission of the command.boolean
Whether a flag or value flag MUST be used for this command.Command usage string that is displayed when an error occurs with the command processing.String[]
List of value flags (without --).
-
Element Details
-
aliases
String[] aliasesA list of root-level command aliases that will be accepted for this command. For example:{"npc", "npc2"}
would match both /npc and /npc2. -
desc
String descA short description of the command that will be displayed with the command usage and help. Translatable. -
flags
String flagsDefines the flags available for this command. A flag is a single character such as-f
that will alter the behaviour of the command. Each character in this string will be counted as a valid flag: extra flags will be discarded. Accepts * as a catch all.- Default:
""
-
help
String helpA longer description of the command and any flags it uses which will be displayed in addition todesc()
in help commands. Translatable.- Default:
""
-
max
int maxThe maximum number of arguments that the command will accept. Default is-1
, or an unlimited number of arguments.- Default:
-1
-
min
int minMinimum number of arguments that are accepted by the command.- Default:
0
-
modifiers
String[] modifiersThe argument modifiers accepted by the command. Also accepts'*'
as a catch all.- Default:
{""}
-
parsePlaceholders
boolean parsePlaceholdersWhether to parse placeholders from the input command.- Default:
false
-
permission
String permissionThe permission of the command. The comamnd sender will get an error if this is not met.- Default:
""
-
requiresFlags
boolean requiresFlagsWhether a flag or value flag MUST be used for this command.- Default:
false
-
usage
String usageCommand usage string that is displayed when an error occurs with the command processing.- Default:
""
-
valueFlags
String[] valueFlagsList of value flags (without --).- Default:
{}
-