Clears items from player inventory, including items being dragged by the player. Show Syntax[]
clear [<targets>] [<item>] [<maxCount>]
clear [player: target] [itemName: Item] [data: int] [maxCount: int] Arguments[]JE: JE: item_id{data_tags} (accepts item or block tags), in which data tags can be omitted when they are not needed. In Bedrock Edition, it must be an
item id or a block id for which items exist.
-1 , all items that match itemName: Item are cleared, regardless of their data. Values (bitwise AND 0xFFFF) that are invalid for the specified item id revert to 0.Must be a 32-bit integer number. Should be between -1 and 2,147,483,647 (inclusive, without
commas).JE: -1 [Bedrock Edition only], all items that match item , or itemName: Item and data: int are cleared. If 0 , instead of clearing of items, detects and queries the amount of specified items.Must be a
32-bit integer number. In Java Edition, it must be between 0 and 2147483647 (inclusive). In Bedrock Edition, it should be between -1 and 2147483647 (inclusive).Result[]
Output[]
Note[]Items in the inventory and items from container (chest, crafting table, etc.) dragging over the cursor can be cleared. In Bedrock Edition, items dragging from the inventory can also be cleared, while in Java Edition only if not in creative mode can these be cleared. In Java Edition, items in players' four crafting slots can also be cleared. Examples[]
See also[]
History[]
How do you quickly drop items in your inventory in Minecraft?To do so, press the number on your keyboard corresponding to the stack of items you would like to drop to select them. Press "Ctrl" on your keyboard and simultaneously press "Q." This will drop the entire stack of items in front of you.
What is the fastest way to manage inventory in Minecraft?Pressing shift and double clicking on a stack will move all of that item between the player's inventory and the block or hotbar. However, players need to ensure that they are already holding an item for this shortcut to work.
How do you delete certain amounts of items in Minecraft?You can clear items from a player's inventory using the /clear command in Minecraft.
What is the command to clear inventory?You can use the command /clear [targets] [item] [maxCount] , where: targets is optional. It is the name of the player (or a target selector) whose inventory you wish to clear.
|