I'm trying to make Thor's hammer and armor, but I need to execute when someone is wearing Thor's armor, because i am trying to do lightning when someone kills 10 entities and i want only with Thor's armor and hammer could "rage" (make lightning).
Minecraft Java Edition – How to Execute Commands When Someone Wears a Specific Item
minecraft-commandsminecraft-java-edition
Best Answer
Give the armor items a custom item tag so that they're easy to detect and impossible to fake:
Then whenever you want to do something with players who are wearing the armor, run these commands:
102b
is the chest armor slot. You can find the other slot numbers on the Wiki: https://minecraft.gamepedia.com/Player.dat_format#Inventory_slot_numbersYou can do something similar with the mainhand item: