So it's about the Bedrock / PE version NICH JAVA (so Handy nich Pc)
and I have the following proplem.: The command (repeat, unconditional, requires redstone) says the following: "/ enchant @a [type = item, name =" Diamond chestplate "] projectile_protection 4" and he can execute the command if the command It is not active whether I hold the diamond breastplate in the ON hand or just leave it in the hot bar!
I think the mistake is that you wrote "@a [type = Item]" but a player is not an item that can't have a sin try "[nbt = {SelectedItem: {id:" minecraft: Item "}}] "and the name is not the item ID but the player name
I'll give it a try!
I have to change it because as I said I don't play java but pe / bedrock, thanks anyway! ; 33