/scoreboard players set @a HasSword 1 {Inventory:[{id:"minecraft:wooden_sword",tag:{ench:[{id:16,lvl:1}]}}]}
I am trying to test to see if a player has a wooden sword with sharpness 1 in their inventory, when they do it will give them a score of 1, HasSword is a dummy objective, When i do this it says "The dataTag does not match for TSchweibz", any ideas?
Create an account or sign in to comment.
2
1
Use EntityData or TestFor.
1
A lot of times it's just fiddling around with figuring out which part is and is not being met, try removing parts of the thing like the "ench:" area or the "id;" area and see which is actually not being met, then maybe look up the proper form of it if you might have made a typo in some way.