ExperimentalReadonly ExperimentalidThe command's local id, unique within the plugin (as CommandOptions.id).
Readonly ExperimentaldeclarationThe declaration, as the player's commands.register takes it.
Optional Readonly ExperimentalstateThe first state; omitted fields are enabled, unchecked (null), not
busy, no reason.
Optional Readonly ExperimentalwhenThe player's conditions for enabled and checked, in wire form.
Optional Readonly ExperimentalrunRuns when the user picks the command or presses its key.
What WireCommands.register takes: the command's local id, the player's declaration, its first state and the handler.
Remarks
Experimental: the wire protocol is not semver; this member changes with versions.
Example: Declare a checked item
A toggle in the Video menu, shown checked from the start. The state fields are the player's (
enabled,checked,busy,reason).Since
1.7.0