-1

How can I check if a player is holding a specific tool? The specific tool can be made of any type of material.

Example:

/execute as @a[nbt={SelectedItem:{id:["minecraft:PICKAXE-ANY-TYPE"]}}] run say "I am holding a Pickaxe"
-3

/execute as @a[nbt={SelectedItem:{id:"minecraft:iron_pickaxe"}}] run say "I am holding a Pickaxe" ID doesn't require these '[]' anymore.

| improve this answer | |
  • Thanks but this does not answer my question :( – Bubble Jul 5 at 19:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.