ItemsBedrockEducation
/replaceitem
Overwrites a specific inventory slot of a block (chest, hopper) or entity (player, mob) with a chosen item. The Bedrock counterpart to Java's /item replace — Java removed standalone /replaceitem in 1.17.
Syntax
Parameters
- destination
- literal
- block <x y z> or entity <target>.
- slot
- slot type
- e.g. slot.weapon.mainhand, slot.armor.head, slot.container.
- slotId
- integer
- Index within the slot type (0 for single slots).
- item
- item ID
- Item to place.
Examples
Put a diamond sword in your main hand.
Fill the first slot of the container at your feet.
Permission level
/replaceitem 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.