I am in 1.13 Pre-Release 7 trying to make a one command creation and I need an item with a specific name. The command I use is /give @p diamond_sword{display:{Name:"Sword of Power"}}
and it gives my a diamond sword, but it doesn't have the name.
Minecraft – Why does the item name not show up in 1.13
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – How to teleport an item to a player in Minecraft 1.13
- Minecraft – How to test for a named item in a players inventory? (Minecraft 1.13)
- Minecraft – item name/Can Destroy not working
- Minecraft – Clearing the player of an item that does NOT have a custom name on it
- Minecraft: Change item name color without affecting locale
Best Answer
In 1.13 many things are JSON that were previously just simple strings. So the syntax is now:
This also means that you can colour the text, make it underlined, translatable, obfuscated, etc.
With Minecraft 1.14, support for single-quoted strings has now been added. This means that you can shorten JSON strings by surrounding them in single quotes
'
instead of double quotes:Whenever an NBT check doesn't work like you expected, I always recommend
/data get
. For example in this case you can hold the item and run: