Catch NPE for #362

This commit is contained in:
HappyPikachu 2018-04-12 00:20:02 -04:00
parent da3d4e0295
commit 770acbce5f

View File

@ -595,7 +595,12 @@ public class Quester {
}
int index2 = 0;
for (ItemStack is : getCurrentStage(quest).itemsToDeliver) {
int delivered = getQuestData(quest).itemsDelivered.get(is);
int delivered = 0;
try {
delivered = getQuestData(quest).itemsDelivered.get(is);
} catch (NullPointerException ne) {
plugin.getLogger().severe("itemsDelivered did not contain " + is.getType() + ":" + is.getDurability() + " x " + is.getAmount() + " for quest " + quest.name);
}
int amt = is.getAmount();
Integer npc = getCurrentStage(quest).itemDeliveryTargets.get(index2);
index2++;