geforkt von Mirrors/Paper
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>
Dieser Commit ist enthalten in:
Commit
f7d207ba65
@ -99,11 +99,13 @@ 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);
|
||||||
|
if(pages != null) {
|
||||||
for (Object page : pages) {
|
for (Object page : pages) {
|
||||||
if (page instanceof String) {
|
if (page instanceof String) {
|
||||||
addPage((String) page);
|
addPage((String) page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
generation = SerializableMeta.getObject(Integer.class, map, GENERATION.BUKKIT, true);
|
generation = SerializableMeta.getObject(Integer.class, map, GENERATION.BUKKIT, true);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren