Select Players with inventory open using Mincraft Commands
Solution 1:
easy fix:
clear @a[nbt=!{Inventory: [{Slot: 0b, id: "minecraft:written_book"}]}] minecraft:written_book
replaceitem entity @a hotbar.0 minecraft:written_book.......
easy fix:
clear @a[nbt=!{Inventory: [{Slot: 0b, id: "minecraft:written_book"}]}] minecraft:written_book
replaceitem entity @a hotbar.0 minecraft:written_book.......