geforkt von Mirrors/Paper
Add null check before iterating over iterator.
By: Xor Boole <mcyoung@mit.edu>
Dieser Commit ist enthalten in:
Ursprung
4335c4162c
Commit
b29ae84fef
@ -99,9 +99,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
|||||||
setTitle(SerializableMeta.getString(map, BOOK_TITLE.BUKKIT, true));
|
setTitle(SerializableMeta.getString(map, BOOK_TITLE.BUKKIT, true));
|
||||||
|
|
||||||
Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_PAGES.BUKKIT, true);
|
Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_PAGES.BUKKIT, true);
|
||||||
for (Object page : pages) {
|
if(pages != null) {
|
||||||
if (page instanceof String) {
|
for (Object page : pages) {
|
||||||
addPage((String) page);
|
if (page instanceof String) {
|
||||||
|
addPage((String) page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren