Stage Actions - unfamily/iskandert_utilities GitHub Wiki
When a stage is added or removed, actions in this directory can run commands.
Path: any data/<namespace>/load/… file with matching type (namespace and subfolder are free) — Library 1.12.0.0.0+. Recommended: load/iska_utils_stage_actions/.
Type: canonical iska_utils:stage_actions (alias iska_lib:stage_actions also accepted — Library 1.12.0.0.0+).
{
"type": "iska_utils:stage_actions",
"overwritable": false,
"actions": [
{
"id": "gamemode_on_stage",
"onCall": true,
"onAdd": true,
"onRemove": true,
"stages_logic": "DEF_OR",
"stages": [
{"stage_type": "player", "stage": "player", "is": true},
{"stage_type": "player", "stage": "admin", "is": true}
],
"if": [
{"conditions": [0], "do": [{"execute": "gamemode adventure @p"}, {"delay": 10}, {"execute": "tellraw @p \"Hello!\""}]},
{"conditions": [1], "do": [{"execute": "gamemode creative @p"}]}
]
},
{
"id": "vip_removed",
"onCall": true,
"onAdd": false,
"onRemove": true,
"stages_logic": "AND",
"stages": [{"stage_type": "player", "stage": "vip", "is": false}],
"do": [{"execute": "gamemode survival @p"}]
}
]
}-
type: Must be iska_utils:stage_actions [required] (aliasiska_lib:stage_actionsaccepted) -
overwritable: Reserved for future use (optional) -
actions: Array of action definitions [required]
-
id: Unique identifier for this action (required). Used by/iska_lib_stage actioncommand. -
onCall: Can be triggered by/iska_lib_stage actioncommand (default: true). Use false to only allow add/remove triggers. -
onAdd: Run when stage is added (default: true) -
onRemove: Run when stage is removed (default: true) -
stages_logic: AND, OR, DEF_AND, DEF_OR (same as command macros) -
stages: Array of stage conditions that define which stage change triggers this action -
do: Array of actions to run:{"execute": "command"}or{"delay": ticks} -
if: Array of branches{"conditions": [indices], "do": [actions]}for conditional execution -
mods: 3.5.0.0.0+ Mod presence load gate or deferred pool (see below) -
mods_logic: 3.5.0.0.0+DEF_AND/DEF_ORformod_conditionsinifbranches
Requires Iskandert's Utilities 3.5.0.0.0 or newer.
Same semantics as Suspicious Delivery — Mod conditions:
-
modswithoutmods_logic: DEF_*— the action definition is skipped at load if any mod condition fails. -
mods_logic: DEF_AND/DEF_OR— addmod_conditionstoifbranches alongsideconditions:
{
"if": [
{ "conditions": [0], "mod_conditions": [0, 1], "do": [{"execute": "say both passed"}] }
]
}Configurations are loaded at server startup. Reload: /iska_lib_dev reload (quick) or /reload (full).