I'm making a Minecraft map and I don't want the player to be able loose his bow. So I wrote this command into a repeating command block:
/replaceitem entity @p hotbar.0 bow{display:{Name:"{"text":"Bow of Shadows","color":"green","italic":"false","bold":"false"}"},"Enchantments":[{id:"minecraft:infinity",lvl:1}]} 1
.
But if I try to shoot an arrow the bow reloads instantly because the command block gives me a new bow and I can't shoot. I have same problem with a shield.
I'm playing Vanilla 1.13.2