Avoid error when no items have been delivered, fixes #362

This commit is contained in:
HappyPikachu 2018-04-13 16:07:18 -04:00
parent 382796a71a
commit 25be6a0e69

View File

@ -596,10 +596,8 @@ public class Quester {
int index2 = 0;
for (ItemStack is : getCurrentStage(quest).itemsToDeliver) {
int delivered = 0;
try {
if (getQuestData(quest).itemsDelivered.containsKey(is)) {
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);