replaceitem entity @a[hasitem={item=diamond_helmet,quantity=0}] slot.armor.head 0 keep diamond_helmet 1 9999
2.damage @a 0 suicide