forked from nisovin/MagicSpells
-
Notifications
You must be signed in to change notification settings - Fork 72
CommandStorageSpell
JasperLorelai edited this page Aug 26, 2026
·
1 revision
spell-class: ".targeted.CommandStorageSpell"Important
Since 4.0 Beta 19.
Instant spell, capable of storing command storage data into MagicSpells variables. Numeric variables can store numeric storage data; string variables will attempt to parse the data of any type to string, but if it fails, it will store the raw NBT found (e.g. arrays will store the stringified ["a", "b"]).
These options support dynamic values through numeric or string expressions.
| Option | Type |
|---|---|
tag |
String |
container-id |
Namespaced key (Defaults to minecraft namespace) |
variable |
Variable name |
variables:
temp_array: {type: playerstring}
storage:
spell-class: ".ExternalCommandSpell"
always-granted: true
do-variable-replacement: true
command-to-execute: ['data modify storage magicspells:temp array append value "item"']
storage_cmd:
spell-class: ".instant.CommandStorageSpell"
always-granted: true
variable: temp_array
container-id: magicspells:temp
tag: array