Minecraft
Give Command Builder
Typing a /give command yourself works right up to the moment you add an enchantment — then it becomes a little JSON puzzle that gives no error messages when you get it wrong. This builds the full command for you, in whichever of the two syntaxes your server uses.
In 1.20.5 item components took over from item NBT. A server accepts only the syntax of its own era and rejects the other outright.
Use any item id — the suggestions are only suggestions. The minecraft: prefix is optional; we add it if you leave it off.
Leave empty for no custom name. Minecraft italicises custom names unless told not to, and the command below tells it not to.
Enchantments
Lore lines
Your command
Without the leading slash in the server console; with it in chat.
/give @p minecraft:netherite_sword[enchantments={"minecraft:sharpness":5}] 1Advertisement
How it works
A /give command is the item id, a block of modifiers, and a count. The modifier block is what 1.20.5 changed: before, it was NBT in curly braces after the item; now it is components in square brackets. Enchantments went from a list of objects to a flat map, custom names left the display compound, and Unbreakable:1b turned into unbreakable={}. The rest of the command is untouched, which is precisely why a broken one is so confusing — it looks correct.
Advertisement
Common mistakes
Two details this gets right that hand-typed commands tend to miss. Minecraft shows custom names in italics unless told otherwise, so the name is written as a JSON text component with italic switched off — that is why the output is longer than a plain string. And enchantment levels past the vanilla cap really do work via commands — Sharpness 255 is a genuine item — but an anvil can never make or repair one, so the builder warns you instead of quietly capping the level.