From d39ff036c7781416811739fa200f82b5c11c9775 Mon Sep 17 00:00:00 2001 From: bm01 Date: Thu, 14 Feb 2013 23:56:09 +0100 Subject: [PATCH] Fixed NPE when clicking outside of the inventory window --- .../java/com/gmail/nossr50/listeners/InventoryListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java index 9c066f519..38679d0fe 100644 --- a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java @@ -138,7 +138,7 @@ public class InventoryListener implements Listener{ public void onInventoryClickEvent(InventoryClickEvent event) { ItemStack item = event.getCurrentItem(); - if (item.containsEnchantment(Enchantment.DIG_SPEED)) { + if (item != null && item.containsEnchantment(Enchantment.DIG_SPEED)) { ItemMeta itemMeta = item.getItemMeta(); if (itemMeta.hasLore()) {