Skip to main content
5 of 5
Changed format, minor edits. (I prefer using this format for smaller strings of code, as it is easier to get an overview)
Joachim
  • 22.7k
  • 15
  • 78
  • 111

Use this command in a repeat Command Block (1.13+):

/execute as @a[nbt={Inventory:[{Slot:102b,id:"minecraft:iron_chestplate"}]}] run replaceitem entity @s armor.chest minecraft:chainmail_chestplate 1

However, this will only work once the Iron Chestplate is placed in the player's armor slot.