I want to replace an equipped leather cap with a glass block.
I tried /replaceitem entity @s slot.armor.head glass, but it didn’t work.
1 Answer
This is the syntax for /replaceitem:
/replaceitem <block|entity> <position or target> <slot type> <slot ID> <item name> [amount] [data] [components]You forgot to define the slot ID, which in your case should be 0:
/replaceitem entity @s slot.armor.head 0 glassYou can find more information about /replaceitem on this site.