I want a player to click on an item in the inventory to open a written book.
My question is, how can I open the book without the player holding a book in hand?
My source is here:
https://www.spigotmc.org/...ui.131470/
((org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer) p) .getHandle (). OpenBook (CraftItemStack.asNMSCopy (book));
Can you explain that to me too?
In the second link, the plugin sends a packet, which pretends to the client to open the book.
In the first guest you see the player as an entity and open the book.
I still think that you can't get away on the way around the book in the inventory.
In what order should I do it?
Should I send the packet first (i.e. The 2 link).
Thanks in advance. I'm not that fit in Java / Spigot yet
First run the book and hand and then the code.