Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

CommandDeclaration

A command as defineCommand returns it, which a plugin’s commands holds and definePlugin makes a CommandHandle of.

Type Parameter Default type
Fields extends CommandFields CommandFields
Reason extends string string
Returns extends ReturnFields | undefined ReturnFields | undefined
ActsThrough extends boolean boolean
EndsWithLevel extends boolean boolean
Predicted extends boolean boolean
Property Modifier Type Description
burst readonly number -
endsWithLevel? readonly EndsWithLevel Whether its lifetime is Level: what its refusals’ type reads, kept as a flag so a declaration’s type names no enum member.
entity readonly ActsThrough -
fields readonly Fields -
keys readonly readonly KeyCode[] The keys and touch button that send it.
lateTicks readonly number How late a predicted command may reach the room and still run.
lifetime readonly CommandLifetime -
perSecond readonly number -
predicted readonly Predicted -
refusals readonly readonly Reason[] -
returns readonly Returns -
timeoutSeconds readonly number -
touch? readonly TouchControl -