diff options
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java index a76ae7d7..42ecde7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java @@ -99,9 +99,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { setTitle(SerializableMeta.getString(map, BOOK_TITLE.BUKKIT, true)); Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_PAGES.BUKKIT, true); - for (Object page : pages) { - if (page instanceof String) { - addPage((String) page); + if(pages != null) { + for (Object page : pages) { + if (page instanceof String) { + addPage((String) page); + } } } |