From 25be6a0e69c8702e5b98b714d20eb96317bc170e Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Fri, 13 Apr 2018 16:07:18 -0400 Subject: [PATCH] Avoid error when no items have been delivered, fixes #362 --- src/main/java/me/blackvein/quests/Quester.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index d3205e5d2..c661ed1fa 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -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);