API reference / @jsprismarine/protocol / CommandParameter
Class: CommandParameter
Defined in: protocol/src/wire/structures/CommandParameter.ts:147
One parameter of a command overload as the AvailableCommandsPacket sends it.
A parameter is a basic type (paramType), an enum (enum), or the tail of a chained /execute overload (chainedSubcommand). When either of the last two is set the packet ignores paramType and writes the table's index instead.
Constructors
Constructor
new CommandParameter(
data?):CommandParameter
Defined in: protocol/src/wire/structures/CommandParameter.ts:156
Parameters
data?
chainedSubcommand?
CommandChainedSubcommand | null
enum?
CommandEnum | null
flags?
isOptional?
boolean
paramName?
string
paramType?
number
postfix?
string | null
Returns
CommandParameter
Properties
chainedSubcommand
chainedSubcommand:
CommandChainedSubcommand|null
Defined in: protocol/src/wire/structures/CommandParameter.ts:154
enum
enum:
CommandEnum|null
Defined in: protocol/src/wire/structures/CommandParameter.ts:152
flags
flags:
CommandParameterFlags
Defined in: protocol/src/wire/structures/CommandParameter.ts:151
isOptional
isOptional:
boolean
Defined in: protocol/src/wire/structures/CommandParameter.ts:150
paramName
paramName:
string
Defined in: protocol/src/wire/structures/CommandParameter.ts:148
paramType
paramType:
number
Defined in: protocol/src/wire/structures/CommandParameter.ts:149
postfix
postfix:
string|null
Defined in: protocol/src/wire/structures/CommandParameter.ts:153