The command was executed correctly but output is a failure
The command was executed correctly
but Command block output a failure
/execute as @a[hasitem=\{item=diamond_block,location=slot.weapon.mainhand}] run kill @e[type=zombie] for example
output: "can't execute kill on OwningMoth98331"
but when My mainhand is Diamond block is executed kill zombies.
----I'm not typed "data" on "hasitem".