From b623f5eec83d550d0cb35ccd6fdb1fdd2ae2cfcc Mon Sep 17 00:00:00 2001 From: Nathan Wolf Date: Thu, 12 Nov 2015 14:50:27 -0800 Subject: [PATCH] Prevent NPE on null items- though not sure how it gets here. --- src/main/java/me/blackvein/quests/util/ItemUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/blackvein/quests/util/ItemUtil.java b/src/main/java/me/blackvein/quests/util/ItemUtil.java index d0dc5c710..f2c629f1b 100644 --- a/src/main/java/me/blackvein/quests/util/ItemUtil.java +++ b/src/main/java/me/blackvein/quests/util/ItemUtil.java @@ -164,7 +164,9 @@ public class ItemUtil implements ColorUtil { public static String getDisplayString(ItemStack is) { String text; - + if (is == null) { + return null; + } if (is.hasItemMeta() && is.getItemMeta().hasDisplayName()) { text = "" + DARKAQUA + ITALIC + is.getItemMeta().getDisplayName() + RESET + AQUA + " x " + is.getAmount(); } else {