registerMode

fun registerMode(modeValueGroup: ModeValueGroup<Mode>, modeObject: Map<String, Any>, callback: Consumer<Mode>)

Registers a new script mode to an existing mode value group which can be obtained from existing modules.

Parameters

modeValueGroup

The choice configurable to add the choice to.

modeObject

JavaScript object containing information about the choice.

callback

JavaScript function to which the corresponding instance of ScriptMode is passed.

See also