Step 1: Let's get the leather helmet to use as an example, using the /give command
Version 1.21+
give @a minecraft:leather_helmet[custom_data={NightVisionHelmet:1b},lore=['["",{"text":"Night Vision I","italic":false,"color":"dark_aqua"}]'],item_name='["",{"text":"Night Vision Helmet","italic":false,"color":"aqua"}]',enchantment_glint_override=true]
Version 1.21.5+ and 26+
give @a minecraft:leather_helmet[custom_name=[{"text":"Night Vision Helmet","italic":false,"color":"aqua"}],lore=[[{"text":"Night Vision I","italic":false,"color":"dark_aqua"}]],custom_data={NightVisionHelmet:1b},minecraft:enchantment_glint_override=true]
In this example, the leather helmet has several parameters used to customize it
You can change the tag -> represented by NightVisionHelmet:1b however you want
And also the color and name the item will have, as well as its lore description, etc.
Step 2: Let's create a repeat command block (the purple one) and set it to always active
So the detection never stops happening, let’s place the following command:
Version 1.21+
execute as @a run effect give @s[nbt={Inventory:[{Slot:103b,id:"minecraft:leather_helmet",components:{"minecraft:custom_data":{NightVisionHelmet:1b}}}]}] minecraft:night_vision 1 0 true
Version 1.21.5+ and 26+
execute as @a[nbt={equipment:{head:{id:"minecraft:leather_helmet",components:{"minecraft:custom_data":{NightVisionHelmet:1b}}}}}] run effect give @s minecraft:night_vision 1 0 true
What does this command do? Basically, it detects if any player is wearing the leather helmet
The Slot represents the armor location in this case, 103b is the helmet, and we'll see the others later
After that check, the effect command will be executed if the player is wearing the leather helmet
Other items: Here are a few more commands below, the idea is the same, just with the other armor items
For the custom leather leggings:
Version 1.21+
give @a minecraft:leather_leggings[custom_data={FastLeggings:1b},lore=['["",{"text":"Speed III","italic":false,"color":"dark_aqua"}]'],item_name='["",{"text":"Speed Leggings","italic":false,"color":"aqua"}]',enchantment_glint_override=true]
To Detect:
execute as @a run effect give @s[nbt={Inventory:[{Slot:101b,id:"minecraft:leather_leggings",components:{"minecraft:custom_data":{FastLeggings:1b}}}]}] minecraft:speed 1 2 true
Version 1.21.5+ and 26+
give @a minecraft:leather_leggings[custom_name=[{"text":"Speed Leggings","italic":false,"color":"aqua"}],lore=[[{"text":"Speed III","italic":false,"color":"dark_aqua"}]],custom_data={FastLeggings:1b},minecraft:enchantment_glint_override=true]
To Detect:
execute as @a[nbt={equipment:{legs:{id:"minecraft:leather_leggings",components:{"minecraft:custom_data":{FastLeggings:1b}}}}}] run effect give @s minecraft:speed 1 2 true
For the custom leather boots:
Version 1.21+
give @a minecraft:leather_boots[custom_data={JumpBoots:1b},lore=['["",{"text":"Jump III","italic":false,"color":"dark_aqua"}]'],item_name='["",{"text":"Jump Boots","italic":false,"color":"aqua"}]',enchantment_glint_override=true]
To Detect:
execute as @a run effect give @s[nbt={Inventory:[{Slot:100b,id:"minecraft:leather_boots",components:{"minecraft:custom_data":{JumpBoots:1b}}}]}] minecraft:jump_boost 1 2 true
Version 1.21.5+ and 26+
give @a minecraft:leather_boots[custom_name=[{"text":"Jump Boots","italic":false,"color":"aqua"}],lore=[[{"text":"Jump III","italic":false,"color":"dark_aqua"}]],custom_data={JumpBoots:1b},minecraft:enchantment_glint_override=true]
To Detect:
execute as @a[nbt={equipment:{feet:{id:"minecraft:leather_boots",components:{"minecraft:custom_data":{JumpBoots:1b}}}}}] run effect give @s minecraft:jump_boost 1 2 true
Your challenge will be to make the chestplate.