Syntax
/data remove entity|block|storage <Selektor|Position|Datenspeicher> <Pfad> /data merge entity|block|storage <Selektor|Position|Datenspeicher> <NBT-Daten> /data get entity|block|storage <Selektor|Position|Datenspeicher> [<Pfad>] [<Skalierung>] /data modify entity|block|storage <Selektor|Position|Datenspeicher> <Pfad> <Operation> from entity|block|storage <Selektor|Position|Datenspeicher> <Pfad> /data modify entity|block|storage <Selektor|Position|Datenspeicher> <Pfad> <Operation> value <NBT-Daten>
Details
/data ...... get... (block <Position>|entity <Selektor>|storage <Datenspeicher>) [<Pfad>] [<Skalierung>]
... merge... (block <Position>|entity <Selektor>|storage <Datenspeicher>) <nbt>
... modify (block <Position>|entity <Selektor>|storage <Datenspeicher>) <Pfad> ...... append from (block <Position>|entity <Selektor>|storage <Datenspeicher>) [<Pfad>]... append value <Wert>... insert <index> from (block <Position>|entity <Selektor>|storage <Datenspeicher>) [<Pfad>]... insert <index> value <Wert>... merge from (block <Position>|entity <Selektor>|storage <Datenspeicher>) [<Pfad>]... merge value <Wert>... prepend from (block <Position>|entity <Selektor>|storage <Datenspeicher>) [<Pfad>]... prepend value <Wert>... set from (block <Position>|entity <Selektor>|storage <Datenspeicher>) [<Pfad>]... set value <Wert>
... remove... (block <Position>|entity <Selektor>|storage <Datenspeicher>) <Pfad>
Rückgabe
- Java
| Befehl | Auslöser | Java |
|---|---|---|
| Beliebig | die Argumente sind nicht korrekt angegeben | Ja |
<Position> ist ungeladen oder außerhalb der Welt
|
Fehlschlag | |
Der Block an der <Position> ist kein Blockobjekt
| ||
<Selektor> kann nicht zu einem Objekt aufgelöst werden (der genannte Spieler muss online sein)
| ||
/data get ...
|
mehr als eine Eigenschaft wird erhalten | |
/data get ... <Pfad>
|
<Pfad> existiert nicht
| |
/data get ... <Pfad> <Skalierung>
|
Die erhaltene Eigenschaft ist keine numerische Eigenschaft | |
/data merge .../data remove .../data modify ...
|
nichts hat sich geändert | |
| Versuch Spielerdaten zu ändern | ||
/data remove .../data modify ... set ...
|
<Pfad> ist keine Verbundtyp-Eigenschaft
| |
/data modify ... from block ...
|
<sourcePos> is unloaded or out of the world | |
| the block at <sourcePos> is not a block entity | ||
/data modify ... from entity ...
|
<sourceEntity> fails to resolve to an entity (named player must be online) | |
/data modify ... from ... <sourcePath>
|
<sourcePath> does not exist | |
/data modify ... append .../data modify ... insert <index> .../data modify ... prepend ...
|
the target tag isn't a list or array | |
| source data isn't of an item type appropriate for the list | ||
/data modify ... insert <index> ...
|
the index is invalid | |
/data modify ... merge ...
|
the target path does not specify a compound tag | |
| the source data is not a compound tag | ||
| any | On success | Get, merge, modify, and remove NBT data. |
- Java & Bedrock
| Befehl | Auslöser | Java | Bedrock |
|---|---|---|---|
| Beliebig | die Argumente sind nicht korrekt angegeben | Ja | Nein |
Ausgabe
| Befehl | Edition | Sitation | SuccesCount | /execute store success ...
|
/execute store result ...
|
|---|---|---|---|---|---|
| Beliebig | Java | Bei Fehlschlag | 0 | 0 | 0 |
| /data get ... | On success | 1 | 1 | 1 | |
| /data get ... <path> | a numeric tag is got | 1 | 1 | the obtained value after rounding down[1] | |
| a list or array tag is got | 1 | 1 | The number of elements in this list or array | ||
| a string tag is got | 1 | 1 | The length of the string | ||
| a compound tag is got | 1 | 1 | The number of tags that are direct children of that compound | ||
| /data get ... <path> <scale> | On success | 1 | 1 | the obtained value multiplied by <scale>, then rounded down[2] | |
| /data merge ... | On success | 1 | 1 | 1 | |
| /data remove ... | On success | 1 | 1 | 1 | |
|
/data modify ... append ... /data modify ... insert <index> ... /data modify ... prepend ... |
On success | 1 | 1 | the number of lists or arrays to which new elements are added | |
| /data modify ... set ... | On success | 1 | 1 | the number of target tags that was successfully modified | |
| /data modify ... merge ... | On success | 1 | 1 | the number of target compound tags that was successfully modified |