diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index c8654c68..0831e13e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -256,19 +256,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta { } public List<String> getPages() { - final List<IChatBaseComponent> copy = ImmutableList.copyOf(pages); - return new AbstractList<String>() { - - @Override - public String get(int index) { - return CraftChatMessage.fromComponent(copy.get(index)); - } - - @Override - public int size() { - return copy.size(); - } - }; + return pages.stream().map(CraftChatMessage::fromComponent).collect(ImmutableList.toImmutableList()); } public void setPages(List<String> pages) { |