From 9926d780c4c9bebcbbd172550c9de09cb93a4079 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 30 Apr 2019 15:33:35 +1000 Subject: [PATCH] SPIGOT-4816: Editing book causes glitchy behaviour --- .../java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index 40bf2e8612..f7c4faf291 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -128,7 +128,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { if (hasPages()) { NBTTagList list = new NBTTagList(); for (IChatBaseComponent page : pages) { - list.add(new NBTTagString(CraftChatMessage.fromComponent(page))); + list.add(new NBTTagString(page == null ? "" : page.getString())); } itemData.set(BOOK_PAGES.NBT, list); }