1. Empty the whole inventory
Naming no item clears everything — the usual way to reset players before a new round
/clear @a
What it does Will clear all items from the inventory of all players.
Clear items from a player's inventory — all of them, or only a specific item
The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there
Naming no item clears everything — the usual way to reset players before a new round
/clear @a
What it does Will clear all items from the inventory of all players.
Name an item to leave everything else alone — for confiscating one specific thing
/clear @p minecraft:diamond
What it does Will clear "Diamond" from the inventory of the nearest player.
A max count subtracts only part of the stack — the basis of an item-based shop
/clear @s minecraft:emerald 5
What it does Will clear "Emerald" from the inventory of themselves (whoever runs the command), up to 5 item(s).
This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row
Every version this tool supports produces the same result, so a command you copy works without version-specific edits
/clear @a