← All articles

Why your /give command does not work, and how to fix it for your version

Most broken /give commands are not typos. They are written for a different version of Minecraft than the one you are running. Item syntax changed three times between 1.20.5 and 1.21.5, and a command copied from a guide for one era fails, or half works, in another.

Checked for versions: Java Edition 1.20 to 26.3. Bedrock Edition uses a different /give syntax and is not covered here.

First find out which version you are on

Look at the version in the launcher profile or the top line of the F3 screen; on a server, the multiplayer list shows it next to the server name. Then use this table to see which shape the command needs.

VersionItem dataNameCustomModelData
Before 1.20.5NBT in {} after the itemdisplay:{Name:'{"text":"…"}'}CustomModelData:12
1.20.5 – 1.21.3Components in []custom_name='{"text":"…"}'custom_model_data=12
1.21.4Componentscustom_name='{"text":"…"}'custom_model_data={floats:[12f]}
1.21.5 – 26.xComponentscustom_name={text:"…"}custom_model_data={floats:[12f]}

The same item in four versions

A paper named Guild Pass with model hook 12. Before 1.20.5:

/give @p minecraft:paper{display:{Name:'{"text":"Guild Pass","italic":false}'},CustomModelData:12} 1

1.20.5 to 1.21.3: item components in square brackets, the name still a JSON string:

/give @p minecraft:paper[minecraft:custom_name='{"text":"Guild Pass","italic":false}',minecraft:custom_model_data=12] 1

1.21.4: CustomModelData became a set of typed lists, so the bare number is rejected:

/give @p minecraft:paper[minecraft:custom_name='{"text":"Guild Pass","italic":false}',minecraft:custom_model_data={floats:[12f]}] 1

1.21.5 to 26.x: text components are written in SNBT, so the name loses its quotes:

/give @p minecraft:paper[minecraft:custom_name={text:"Guild Pass",italic:false},minecraft:custom_model_data={floats:[12f]}] 1

Each line works only in its own range. That is why "the command from the video" so often fails: the video was made for another version.

What the failure tells you

Too long for chat

Chat accepts 256 characters per command; a command block holds up to 32,500. A /give with a name, lore, enchantments and attributes passes 256 quickly. Get a command block with /give @p minecraft:command_block, paste the command there and power it with a button.

A debug order that finds the broken part fast

  1. Check the version and pick the matching row of the table above.
  2. Run the bare item first: /give @p minecraft:paper. If that fails, the problem is the selector or permissions, not the item data.
  3. Add one component at a time, name first, then lore, then the model hook, then enchantments. The step that breaks is the one to fix.
  4. When the command works but the look is wrong, move to the resource pack and check that the model hook in the pack reads the same slot the command fills.

If you write these often, the custom item builder produces the command for each of the four versions from the same fields, which removes the quoting step where most mistakes happen.

FAQ

Why does my old world still have the items, but my commands stopped working?

When a world is opened in a newer version, the game converts the items stored in it. Text inside command blocks, functions and your notes is not converted, so those commands keep the old syntax until you rewrite them.

custom_name or item_name?

Both exist since 1.20.5. custom_name behaves like an anvil rename: italic unless you set italic:false. item_name is the item's own name: not italic, and an anvil cannot remove it.

Can I keep one command for several versions?

Not across the 1.20.5, 1.21.4 and 1.21.5 boundaries. Keep one line per version range, or keep the item data in one place and generate the commands.