PT-BR EN ES
Channel Icon

Crazy Ozz

Official Channel Website

Command Block

How to Add Effects to Armor in Minecraft Using Commands (No Mods)

Version 1.21+ and 1.21.5+ / 26+ Java Edition

Want to give your armor special powers without using mods? In this tutorial, you’ll learn how to create custom armor that grants effects like Night Vision, Speed, and Jump Boost automatically when equipped, using simple /give commands and command block detection (Minecraft Java 1.21+ and 1.21.5+ / 26+).

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

Want cheap and lag-free Minecraft hosting?

I recommend Sparked Host: affordable plans, great performance, easy panel and fast support.

🚀 Start your Minecraft Server

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.

Still have questions? Watch the video below