I am making a mini-game map, items will appear in invisible item frames. I'm going to use this command
/item replace entity @e[type=minecraft:item_frame,nbt=!{Item:{}},limit=1,sort=random] container.0 with minecraft:arrow
to fill random item frames with random items.
I would like to make these item frames unbreakable and able to take any item in it. Is there any chance to allow players only to take items in it, not to place it? How can I do that?