How can I fix my /testfor for if somebody has a nametag in their inventory?
//ads -- adsterra.com -- native banner
?>
When I put into the command block:
/testfor @a[1219,4,547] {Inventory:[{id:"minecraft:name_tag"}]}
and power it when I'm in the correct area, the comparator does not power. What am I doing wrong?
Best Answer
You don't need testfor for this. Just use /clear @a name_tag 0. That will remove 0 name tags, giving a comparator output when a player has one. You can replace @a with your area selector.
Pictures about "How can I fix my /testfor for if somebody has a nametag in their inventory?"



How do you detect if a player is holding a named item?
2. Type the Command✔ How To Use Name Tags in Minecraft
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Andrea Piacquadio, Andrea Piacquadio, ANTONI SHKRABA, Elijah O'Donnell
