Skip to content
MC Command Generator

Why your command broke: 5 version changes behind every common error

GuideJava 1.20.4 → 26.37 min read9 commands

One Minecraft command in every format it has had: NBT vs components, JSON vs SNBT text, camelCase vs snake_case events, equipment and the 1.21.11 rename.

When a command that worked in a video fails in your game, it is almost always one of five format changes. Find your symptom below, compare the versions and copy the one for your game — or paste your broken command into its generator (Paste a command) and it is rewritten for the version you pick.

“Expected whitespace to end one argument, but found trailing data”

You pasted an old {…} NBT item into Java 1.20.5 or later. Item data moved into components in square brackets. Here is one item in all three formats:

#1Wand · 1.20.4 (NBT)Rare

Item data in curly braces, text as JSON strings inside quotes.

give @p minecraft:stick{display:{Name:'{"text":"Wand","color":"light_purple","italic":false}',Lore:['{"text":"Old magic","color":"gray"}']}}
Open in /give Java 1.20.2 – 1.20.4
#2Wand · 1.20.5 – 1.21.4 (components, JSON text)Rare

Square brackets and component names — but names and lore are still JSON strings.

give @p minecraft:stick[custom_name='{"text":"Wand","color":"light_purple","italic":false}',lore=['{"text":"Old magic","color":"gray"}']]
Open in /give Java 1.20.5 – 1.20.6
#3Wand · 1.21.5+ (components, SNBT text)Epic

The current format: text written directly as SNBT, no quotes around it.

give @p minecraft:stick[custom_name={text:"Wand",color:"light_purple",italic:false},lore=[{text:"Old magic",color:"gray"}]]
Open in /give Java 26.3

The lore shows raw JSON like {"text":…}

Your command has the 1.20.5 – 1.21.4 format, but you’re on 1.21.5 or later. Text became SNBT, so a quoted JSON string is now read as literal text and printed as it is. Drop the quotes — the third Wand above is the fix.

The chat button doesn’t do anything

From 1.21.5 the click and hover keys are snake_case, and some fields were renamed. Old clickEvent and hoverEvent keys are no longer read.

#4Vote button · up to 1.21.4Rare

clickEvent and hoverEvent in camelCase; the hover text is called contents.

tellraw @a {"text":"[Vote]","color":"green","clickEvent":{"action":"run_command","value":"/trigger vote"},"hoverEvent":{"action":"show_text","contents":"Click to vote"}}
#5Vote button · 1.21.5+Epic

click_event and hover_event in snake_case; run_command takes command, the hover takes value.

tellraw @a {text:"[Vote]",color:"green",click_event:{action:"run_command",command:"/trigger vote"},hover_event:{action:"show_text",value:"Click to vote"}}

The zombie spawns empty-handed

1.21.5 replaced the HandItems and ArmorItems lists with one equipment compound. Old tags are not read, so the mob spawns without its gear.

#6Armed zombie · up to 1.21.4Rare

HandItems and ArmorItems lists, where the position in the list decides the slot.

summon minecraft:zombie ~ ~ ~ {HandItems:[{id:"minecraft:iron_sword",count:1},{}],ArmorItems:[{},{},{},{id:"minecraft:iron_helmet",count:1}]}
Open in /summon Java 1.21.4
#7Armed zombie · 1.21.5+Epic

One equipment compound with named slots.

summon minecraft:zombie ~ ~ ~ {equipment:{mainhand:{id:"minecraft:iron_sword",count:1},head:{id:"minecraft:iron_helmet",count:1}}}
Open in /summon Java 26.3

“Incorrect argument” on /gamerule

Java 1.21.11 renamed every game rule to snake_case.

#8Keep inventory · up to 1.21.10Rare

The camelCase name every tutorial uses.

gamerule keepInventory true
Open in /gamerule Java 1.21.9 – 1.21.10
#9Keep inventory · 1.21.11+Epic

Game rules were renamed to snake_case — the old spelling is no longer accepted.

gamerule keep_inventory true
Open in /gamerule Java 26.3

“Unknown item” or “Unknown entity”

The ID changed or doesn’t exist in your version yet. 1.13 renamed most items (wool 14 became red_wool), 1.16 turned the zombie pigman into the zombified_piglin, and new mobs such as the Sulfur Cube only exist from the version that added them. Every generator checks IDs against the game data for your version and tells you which version an ID was added or removed in — try it in the /summon generator.

Still stuck?

Pick your exact version first, then build the command in its generator instead of editing by hand. If it reads your paste, it can write it for any version from 1.13 to 26.3 — and for Bedrock, which has no NBT at all.