diff --git a/src/main/java/net/minestom/server/item/metadata/WrittenBookMeta.java b/src/main/java/net/minestom/server/item/metadata/WrittenBookMeta.java index 787701324..c3c71c831 100644 --- a/src/main/java/net/minestom/server/item/metadata/WrittenBookMeta.java +++ b/src/main/java/net/minestom/server/item/metadata/WrittenBookMeta.java @@ -2,6 +2,7 @@ package net.minestom.server.item.metadata; import net.minestom.server.chat.ChatParser; import net.minestom.server.chat.ColoredText; +import net.minestom.server.chat.JsonMessage; import org.jetbrains.annotations.NotNull; import org.jglrxavpok.hephaistos.nbt.NBTCompound; import org.jglrxavpok.hephaistos.nbt.NBTList; @@ -16,7 +17,7 @@ public class WrittenBookMeta implements ItemMeta { private WrittenBookGeneration generation; private String author; private String title; - private ArrayList pages = new ArrayList<>(); + private ArrayList pages = new ArrayList<>(); /** * Gets if the book is resolved. @@ -98,7 +99,7 @@ public class WrittenBookMeta implements ItemMeta { * * @return a modifiable {@link ArrayList} with the pages of the book */ - public ArrayList getPages() { + public ArrayList getPages() { return pages; } @@ -107,7 +108,7 @@ public class WrittenBookMeta implements ItemMeta { * * @param pages the array list containing the book pages */ - public void setPages(ArrayList pages) { + public void setPages(ArrayList pages) { this.pages = pages; } @@ -170,7 +171,7 @@ public class WrittenBookMeta implements ItemMeta { } if (!pages.isEmpty()) { NBTList list = new NBTList<>(NBTTypes.TAG_String); - for (ColoredText page : pages) { + for (JsonMessage page : pages) { list.add(new NBTString(page.toString())); } compound.set("pages", list);