Creates an instance of the command
class.
The command to create.
An instance of the command
class.
Optional
categoriesThe categories of the command.
This is used in the manage commands menu to determine where it should appear.
Optional
categoryThe category(ies) of the command.
This is used in the manage commands menu to determine where it should appear.
Optional
command_The version of the command.
The name of the command.
The commands format version that the command was created in.
The ID of the command settings.
The currently entered command name, either the command name or an alias.
Optional
currentescregexpThe current escaped regular expression to determine if a string is this command, either the regular expression or the regular expression of an alias.
Optional
customThe number of lines of code in the custom command.
Optional
customThe ID of the custom command.
Optional
customWhether parameters should be automatcially evaluated for the command.
Optional
customThe list of parameters of the custom command.
Optional
customThe prefix of the custom command.
Optional
customThe type of the custom command.
Optional
descriptionThe description of the command.
Optional
escregexpThe escaped regular expression to determine if a string is this command.
The version of the add-on that custom command was created in.
The syntaxes of the command.
The formatting code of the command.
Optional
parametersThe parameters of the command.
Only applies to custom commands.
Optional
displayType?: stringThe display type of the parameter.
Optional
evaluationType?: stringThe evaluation type of the parameter.
Optional
internalType?: evaluateParametersArgumentTypesThe internal type of the parameter.
The name of the parameter.
Optional
type?: stringThe type of the parameter.
Optional
selectedaliasThe currently selected alias of the command, if the user is using an alias.
The details of the alias.
Optional
aliasTo?: stringThe name of the command the alias is an alias of.
The name of the alias.
Optional
escregexp?: { f?: string; v: string }The escaped regular expression of the alias.
The regular expression of the alias.
The index of the alias.
The type of the command.
"built-in"
: Built-in command."custom"
: Custom command."unknown"
: Unknown command type.The aliases of the command.
Only available if the command is a built-in command.
The code of the custom command.
If customCommandType is commands
, the code will be a list of strings with vanilla Minecraft commands.
If customCommandType is javascript
, the code will be a list of strings that represent lines of JavaScript code, this should be merged together with newline characters.
If the command is not a custom command (Tests if the type property is custom
).
If the customCommandId property is undefined.
The current regular expression to determine if a string is this command, will be either the parsed regexp of the command or on of its aliases.
If the command is deprecated.
If the command is functional.
If the command is hidden.
The regular expression to determine if a string is this command.
The release stage of the command.
The settings of the command, will be an instance of the commandSettings class.
The ultra security mode security level of the command.
Only applies when ultra security mode is enabled.
owner
: Only the owner or people with the andexdb.fullControl
or andexdb.useOwnerLevelCommands
permissions can execute the command.headAdmin
: Only players with the andexdb.headAdmin
or andexdb.useHeadAdminLevelCommands
permissions can execute the command.admin
: Only players with the andexdb.admin
or andexdb.useAdminLevelCommands
permissions can execute the command.moderator
: Only players with the andexdb.moderator
or andexdb.useModeratorLevelCommands
permissions can execute the command.WorldEdit
: Only players with the andexdb.WorldEdit
permission can execute the command.everyone
: Everyone can execute the command.Static
defaultStatic
dpThe current prefix set for the chat commands.
This is an alias of defaultPrefix.
Removes the current command if it is a custom command.
If the command is not a custom command (Tests if the type property is custom
).
If the customCommandId property is undefined.
Runs the custom command.
The command string.
The executor of the command.
Optional
player: Player | Globals.modules.cmds.executeCommandPlayerWThe player object that can be accessed by the code of the command.
Optional
event: ObjectThe event object that can be accessed by the code of the command.
If the command is not a custom command (Tests if the type property is custom
).
If the customCommandId property is undefined.
Saves the custom command.
The ID of the custom command.
If the command is not a custom command (Tests if the type property is custom
).
If the customCommandId property is undefined.
Tests if the given player can use this command.
The player to test.
True if the player can use this command, false otherwise. If the player is an instance of the executeCommandPlayerW class, and there is no linked player, or the linked player is not online, the function will return false.
Static
findGets a built-in command.
The command string to detect the command from.
Optional
returnCommandInsteadOfAlias: boolean = falseWhether or not to always return the main command, even if the detected command is an alias.
The built-in command.
Static
getStatic
getStatic
getStatic
getStatic
getGets the built-in commands of a category.
The category of the commands.
Optional
noSort: boolean = falseIf set to true, it will not sort the commands.
The array of built-in commands.
Represents a command.
Type Param: The
type of the command.