diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index debca310e1..0c69a3e73b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -78,7 +78,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { for (int i = 0; i < pages.size(); i++) { String page = pages.getString(i); if (resolved) { - page = CraftChatMessage.fromComponent(ChatSerializer.a(page)); + try { + page = CraftChatMessage.fromComponent(ChatSerializer.a(page)); + } catch (Exception e) { + // Ignore and treat as an old book + } } pageArray[i] = page; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java index fd8ba56d9c..8c3d3a4405 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -39,7 +39,11 @@ class CraftMetaBookSigned extends CraftMetaBook implements BookMeta { for (int i = 0; i < pages.size(); i++) { String page = pages.getString(i); if (resolved) { - page = CraftChatMessage.fromComponent(ChatSerializer.a(page)); + try { + page = CraftChatMessage.fromComponent(ChatSerializer.a(page)); + } catch (Exception e) { + // Ignore and treat as an old book + } } pageArray[i] = page; }