From b0ef3996ed1908b227feabbbe382f6452d73baef Mon Sep 17 00:00:00 2001 From: BlackHole Date: Mon, 22 Jul 2019 23:07:22 +0200 Subject: [PATCH] SPIGOT-4679 Fix black lines after book paragraphs Also increase max page count to 100 to match 1.14 --- .../java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index f7c4faf291..b927b802a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -26,7 +26,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { static final ItemMetaKey BOOK_PAGES = new ItemMetaKey("pages"); static final ItemMetaKey RESOLVED = new ItemMetaKey("resolved"); static final ItemMetaKey GENERATION = new ItemMetaKey("generation"); - static final int MAX_PAGES = 50; + static final int MAX_PAGES = 100; static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes static final int MAX_TITLE_LENGTH = 32; @@ -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(page == null ? "" : page.getString())); + list.add(new NBTTagString(page == null ? "" : page.e())); // PAIL getLegacyString } itemData.set(BOOK_PAGES.NBT, list); }