Dodge NPE in ItemStackAdapter
This commit is contained in:
parent
b2bdd68069
commit
1c42916d5b
@ -441,7 +441,15 @@ public class ItemStackAdapter implements JsonDeserializer<ItemStack>, JsonSerial
|
||||
if (meta2json)
|
||||
{
|
||||
if (!meta.hasTitle()) return;
|
||||
json.add(BOOK_PAGES, convertStringList(meta.getPages()));
|
||||
try
|
||||
{
|
||||
json.add(BOOK_PAGES, convertStringList(meta.getPages()));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
// It seems CraftMetaBook#getPages some times throw an NPE.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user