Player management
Clear items from every player
Clear everyone's inventory before starting an activity
- Edition
- Java Edition
- Version
- Java Edition 1.20.5 - 1.21.4
- Difficulty
- Intermediate
- Prep time
- 1 minutes
- Copied
- 1 times
- Permission
- Requires cheats to be enabled or operator permission
When to use it
Reset equipment before a minigame with controlled inventories. This deletes online players’ items, including staff inventories; it does not organize or move those items into storage.
Before running
Back up the world and have players store valuables first. Verify the participant list. Keep this out of repeating systems and away from controls that can be triggered accidentally.
Warnings
This command deletes all items and cannot be undone
Follow in order
All commands
Warn before clearing
/tellraw @a {"text":"กำลังจะล้างอินเวนทอรีทุกคน เก็บของสำคัญเข้าหีบก่อน","color":"red"}Wait until everyone has stored their items before running the clear line
Clear inventories
/clear @aDouble-check the world and players before running this
What to customize
Start with a named test player instead of @a. For a specific item or quantity, build a filtered clear command; this line contains no item filter.
Verify the result
Check the test account’s inventory and command feedback before targeting all participants. Copying on this site deletes nothing, but an in-game execution has no complete inventory undo command.
When results differ
If the wrong person is cleared, stop any automation and assess backup recovery. Guessing replacement items will not reliably restore names, enchantments, or other custom item data.