← Back to Command Directory ← Back to Home

/data

Reads or modifies NBT data on blocks, entities, or storage.

Syntax

/data get entity <target> [path]
/data merge block <x> <y> <z> <nbt>

Parameters

NameRequiredDescription
targetYesEntity or block to inspect.
pathNoNBT path selector.
nbtNoNew NBT data to merge.

Examples

/data get entity @p SelectedItem
/data merge block ~ ~ ~ {CustomName:"\"Cool Chest\""}

Notes

Version Differences

Java-only in current editions.

Related Commands