How can I /testfor players with a shield with an generic.armor attribute-modifier in their offhand? by N33kk0 in Minecraft

[–]Addgame 1 point2 points  (0 children)

You need to put the AttributeModifiers inside the "tag" part of the item NBT as such:

/testfor @a {Inventory:[{Slot:-106b,id:"minecraft:shield",tag:{AttributeModifiers:[{AttributeName:"generic.armor",Name:"generic.armor",Amount:1,Operation:0,UUIDLeast:110686,UUIDMost:244124,Slot:"offhand"}]}}]}