Class SwitchNode
java.lang.Object
com.soulfiremc.server.script.AbstractScriptNode
com.soulfiremc.server.script.nodes.flow.SwitchNode
- All Implemented Interfaces:
ScriptNode
Flow control node that performs a multi-way branch based on a value. Input: value (the value to switch on) Input: cases (comma-separated list of case values) Output: branch (string indicating which case matched, or "default")
The script executor should use the output to determine which branch to execute.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteReactive(NodeRuntime runtime, Map<String, NodeValue> inputs) Executes this node reactively with the given runtime and inputs.Methods inherited from class AbstractScriptNode
completedEmptyMono, completedMono, delayedEmptyMono, delayedMono, emptyResult, getBooleanInput, getBotInput, getDoubleInput, getFloatInput, getInput, getIntInput, getJsonInput, getListInput, getLongInput, getStringInput, getStringListInput, requireBot, result, results
-
Field Details
-
METADATA
-
-
Constructor Details
-
SwitchNode
public SwitchNode()
-
-
Method Details
-
executeReactive
public reactor.core.publisher.Mono<Map<String, NodeValue>> executeReactive(NodeRuntime runtime, Map<String, NodeValue> inputs) Description copied from interface:ScriptNodeExecutes this node reactively with the given runtime and inputs.- Parameters:
runtime- the node runtime providing access to instance and schedulerinputs- the resolved input values from connected nodes or default values- Returns:
- a Mono that completes with the node's output values
-