How to clear your inventory in Minecraft
Type /clear in chat as an operator to empty your own inventory, or clear Steve minecraft:tnt in the server console to remove one item from a player.
clear
Removes items from player inventories, either everything or a specific item and amount.
/clear [<targets>] [<item>] [<maxCount>] Examples
/clear Steve Empties Steve's whole inventory.
/clear @a minecraft:tnt Removes all TNT from every player.
/clear @p minecraft:diamond 0 Counts the nearest player's diamonds without removing any.
Arguments
targetsOptional- Player name or selector. Defaults to yourself.
itemOptional- Item ID or
#tagto remove. Defaults to every item. maxCountOptional- Maximum number of items to remove.
0only counts.
What it does
With no arguments it empties your own inventory. Name an item (or an item tag like #minecraft:logs) to remove only that, and add a maximum count to limit how many are removed. A max count of 0 removes nothing and only reports how many matching items the player has.
Good to know
- Needs operator permission level 2.
- Armor and the offhand slot are cleared too.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.