ItemsJavaBedrock

/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.

Syntax

Alternate forms:

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).

Examples

  • Put a netherite sword in your main hand.

  • Equip a diamond helmet.

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.