/item
Manipulates items already in an inventory slot of a block or entity: /item replace overwrites a slot with a new item (or a copy from another slot), and /item modify applies an item_modifier function. The modern, slot-aware replacement for the old /replaceitem in Java Edition.
What is /item used for?
What /item is for
Replaces or modifies items already in an inventory slot of a block or entity — the modern Java replacement for /replaceitem.
When to use /item
Force gear into a player's hands or armor slots, stock a container, or apply an item modifier to existing items.
Tips for /item
Slots use names like weapon.mainhand, armor.head, and container.0. /item replace overwrites a slot; /item modify applies a loot-table item modifier.
Syntax
Parameters
- action
- literal
- replace or modify.
- slot
- slot ID
- e.g. weapon.mainhand, armor.head, container.0, hotbar.0.
- itemoptional
- item ID
- Item to place (for replace ... with).
Command builder
Fill in the options below to generate a ready-to-paste /item command.
replace or modify.
e.g. weapon.mainhand, armor.head, container.0, hotbar.0.
Item to place (for replace ... with).
Examples
Put a netherite sword in your main hand.
Equip a diamond helmet.
Common questions
How do I put an item in a player's off hand?
Use /item replace entity @s weapon.offhand with <item>. For armor, use armor.head, armor.chest, armor.legs, or armor.feet.
What replaced /replaceitem on Java?
/item replace. /replaceitem was removed from Java in 1.17 but still exists on Bedrock.
Permission level
/item requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.