Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
Debian 10
-
This server is running CraftBukkit version 3138-Spigot-66f9d3c-77058c7 (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT)
-
Yes
Description
Signing or editing a book triggers the PlayerEditBookEvent (I've checked), but the new book's BookMeta is not updated correctly. At the very least, setting the book's lore does not work.
Steps to reproduce:
- Use the code below to listen for the event and update lore.
- Sign or save a book (/give @p writable_book -> right click anywhere -> write something and sign/save the book).
- The book should show "Lore Test" below the usual text when hovering over the item, but it doesn't.
@EventHandler public void onPlayerEditBook(PlayerEditBookEvent e) { BookMeta meta = e.getNewBookMeta(); List<String> newLore = new ArrayList<>(); newLore.add("Lore Test"); meta.setLore(newLore); e.setNewBookMeta(meta); }