Use /scoreboard players tag @p add leather_helmet{Inventory:[{Slot:103b,id:"minecraft:leather_helmet",tag:{display:{Name:"example"}}}]}. Then you can use that tag in target selector.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, I'm trying to do so that when I have a specific leather cap on:
/testfor @p {Inventory:[{Slot:103b,id:"minecraft:leather_helmet",tag:{display:{Name:"example"}}}]}
it detects if I'm at Y=72 coordinate (only Y) and then teleport me to ~ 76 ~
with this last part is which I need help with
Thank you and sry if my english is bad
Use /scoreboard players tag @p add leather_helmet{Inventory:[{Slot:103b,id:"minecraft:leather_helmet",tag:{display:{Name:"example"}}}]}. Then you can use that tag in target selector.