🧹
Utility
/clear
Wipe items from a player's inventory — all of them, or just one.
At a glance
Syntax
Syntax
/clear [target] [item] [count]commandtargetcoordsvaluerequiredoptional
See it
What it does
💎
🍖
🪓
🧱
🏹
🌾
The inventory is cleared out
Anatomy
Every part, explained
- 1
CommandRequired/clearRemoves items from an inventory.
- 2
TargetOptional[target]Whose inventory. Defaults to you.
- 3
ItemOptional[item]Limit it to one item id. Omit to clear all.
- 4
CountOptional[count]How many to remove. Omit to remove every match.
Your turn
Try it yourself
Playground
Tab
1 token · press Enter to run
Copy & paste
Examples
/clearEmpty your whole inventory.
/clear @s dirtRemove just the dirt.
/clear @aClear everyone's inventory.
Avoid these
Common mistakes
✕
/clear @s diamond 0✓
/clear @s diamondCount 0 only counts items — it removes nothing.
✕
/clear @s dirts✓
/clear @s dirtItem ids are singular — 'dirt', not 'dirts'.
Keep going