ExperimentalExperimental
Release the resource. Resolves once the player confirmed the release (or immediately for purely local resources). Never rejects.
A "Turn feature off" item removes the feature's own menu item at once,
before the plugin stops. dispose takes the command out of the menu and
the binding table and resolves once the player confirmed it; the id can
be added again later.
const extra = plugin.commands.add({ id: "extra", path: ["Tools", "Extra"], run() {} });
plugin.commands.add({
id: "extra-off",
path: ["Tools", "Turn extra off"],
run: () => extra.dispose(), // never rejects
});
Experimental
Send a new state, merged into the last one sent.
The fields to change.
Optionalwhen: Json
The player's conditions, in wire form.
Once the player took the new state.
Experimental: the wire protocol is not semver; this member changes
with versions. One commands.update with the next revision, after the
registration; several calls are sent in order, the newest last. when
replaces the conditions (omitted: the last ones sent stay).
Readonly ExperimentalidThe local id given in WireCommandOptions.id.
Readonly ExperimentalreadyResolves once the player registered it.
A command registered with WireCommands.register: its id, its registration and explicit state updates. Experimental: the wire protocol is not semver; this member changes with versions.
Remarks
Its state changes only through WireCommand.update; nothing is evaluated in the update passes. Disposing it (or its scope) removes it from the menu and the binding table. The player sends a pick as
commands.execute; the SDK callsrun, and Wire.on hears the event too.Example: Show work in progress on a command
The command shows busy while its export runs and normal again after. Each update is one request, numbered by the SDK.
Since
1.7.0