When an item with custom attributes is equipped (such as a chest plate with +3 armour and +5 health) the attributes are applied. However if you also equip another item with attributes, the second item's attributes are applied and replace the attributes of the first item.
(attributes don't stack)
Environment
windows 10 (not minecraft windows 10 version, but playing minecraft on a computer that happens to have windows 10)
Linked issues
Comments 2
/give @p minecraft:leather_chestplate 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:5,Operation:0,UUIDLeast:309000,UUIDMost:77174,Slot:"chest"}]}
/give @p minecraft:leather_leggings 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:5,Operation:0,UUIDLeast:309000,UUIDMost:77174,Slot:"legs"}]}
if you equip both items you will only get a total of +5 (2.5 full hearts, 5 half hearts) health. However the fact that 5+5=10 means that the attributes dont stack
The same effect is in place if the commands used the movement speed, armour, and knockback resistance attributes. the rest have not been tested
Please provide exact commands used.