Set Item N B T
Description
Sets an NBT value on an item
The value is stored in the item's custom data. To change vanilla item data such as dye colors, armor trims or enchantments, use SetItemComponents instead.
Attributes
| Attribute | Aliases | Description | Default |
|---|---|---|---|
| equipslot | slot, s | The [slot] where the equipment you want to set the NBT of is located | |
| key | k | The NBT key to set. Can be a path | |
| value | val, v | The value to set |
Examples
Skills:
- setItemNBT{key=some_key;value=<caster.name>} @self
Skills:
- setItemNBT{slot=HEAD;key=some_key;value=int/5} @self
Skills:
- setItemNBT{key=some.other_key;value=double/5} @self
Aliases
- setSlotNBT