I'm trying to direct /execute to the location of a player who is holding a specific item. In this case, an item with the name "Gun". This is the script I'm trying to use:
/execute @e {SelectedItem:{tag:{display:{Name:"Firestarter"}}}} ~ ~ ~
/summon Fireball ~ ~ ~ {ExplosionPower:0,direction:[0.0,0.0,0.0]}
Unfortunately, this doesn't work. I've compiled the script from two working scripts:
/execute @p ~ ~ ~
/summon Fireball ~ ~ ~ {ExplosionPower:0,direction:[0.0,0.0,0.0]}
and
/testfor @e {SelectedItem:{tag:{display:{Name:"Gun"}}}}
Does anyone know how to put these together? The output of the command block is "that entity cannot be found"