Updated:
Check these first
- Java or Bedrock? The same-looking command can differ between editions.
- Chat or command block?
- Is the selector (
@p,@a,@e) right? - Are the coordinates relative to you or absolute?
- Is every ID spelled correctly?
Narrow it down
- Try a short version of the command first.
- Fix the target to
@p. - Use coordinates next to you.
- Remove NBT or components for now.
- When it works, add the parts back one at a time.
Test on a copy of an important world.
By symptom
"Unknown or incomplete command"
A misspelled command name or a missing argument. /give diamond fails because the target is missing. A command your edition does not have, such as /data on Bedrock, gives the same message. See unknown or incomplete command.
Text turns red partway through
Java colors the chat red from the first problem onward. Check the argument just before the red starts.
No error, but nothing happens
The syntax is fine but nothing matched. Loosen type or distance; see No entity was found.
A command block does nothing
Check the block type, Needs Redstone or Always Active, chain arrows, and enable-command-block=true on servers. Full list in command block not working.
Common culprits per command
- /give: wrong item ID or old item syntax; see give not working.
- /summon: wrong entity ID or ignored NBT; see summon not working.
- /fill: area over 32,768 blocks; see the fill guide.
- /execute: order matters, start short; see execute not working.
Permission
In single player, commands need Allow Cheats from world creation. Java can enable them temporarily with Open to LAN; Bedrock has a world setting, but turning it on disables achievements for that world. On servers you need operator status from /op.
Was the command written for another version?
Check when a command you found was written. Java changed command formats heavily in 1.13, in 1.20.5 (item NBT became components; see NBT vs components) and in 1.21.5 (text and item details). The converter can update some of them.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.