mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
Merge pull request #75 in SPIGOT/craftbukkit from ~XOR/craftbukkit:fixbookserial to master
* commit 'b29ae84fefdb9fc9fa33269389b3a8ce4dc50d31': Add null check before iterating over iterator. By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
commit
f7d207ba65
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue