How can I detect if a player is wearing a piece of armour?
Let's say it was leather and named bob with a single lapis dye added to it.
what would I do? I can't use comparators and such, only command blocks – it will have a constant clock attached
minecraft-commandsminecraft-java-edition
How can I detect if a player is wearing a piece of armour?
Let's say it was leather and named bob with a single lapis dye added to it.
what would I do? I can't use comparators and such, only command blocks – it will have a constant clock attached
Best Answer
Since 1.13 you can do the check and do something based on it in one command. This for example does something as the closest player who wears elytra:
Slot 102 is the chestplate slot, 103 is the head, 101 the legs and 100 the feet.
This for example does something only if a player with a Protection 4 diamond helmet exists somewhere in the world, but still in the same position that the command is executed at and as the same executor: