API reference / @jsprismarine/protocol / CommandData
Class: CommandData
Defined in: protocol/src/wire/structures/CommandData.ts:6
One command and its overloads in the command catalog sent by AvailableCommandsPacket.
Constructors
Constructor
new CommandData():
CommandData
Returns
CommandData
Properties
aliases
aliases:
CommandEnum|null=null
Defined in: protocol/src/wire/structures/CommandData.ts:16
Hard enum of alternate spellings, or null when the command has no aliases.
chainedSubcommands
chainedSubcommands:
CommandChainedSubcommand[] =[]
Defined in: protocol/src/wire/structures/CommandData.ts:22
The chained subcommand tables this command declares, written as CommandData Chained Subcommand Indexes. Only /execute has any.
commandDescription
commandDescription:
string='commandDescription'
Defined in: protocol/src/wire/structures/CommandData.ts:10
Human-readable command description shown in command suggestions.
commandName
commandName:
string='commandName'
Defined in: protocol/src/wire/structures/CommandData.ts:8
Command spelling shown by the client and used when it is entered.
flags
flags:
number=0
Defined in: protocol/src/wire/structures/CommandData.ts:12
Protocol-defined command flags, encoded as a little-endian uint16.
overloads
overloads:
CommandParameter[][] =[]
Defined in: protocol/src/wire/structures/CommandData.ts:25
Each array describes one valid sequence of parameters for this command.
permission
permission:
number=0
Defined in: protocol/src/wire/structures/CommandData.ts:14
Permission level advertised to the client.