Fixed NPE when clicking outside of the inventory window

This commit is contained in:
bm01 2013-02-14 23:56:09 +01:00
parent 6702256b4c
commit d39ff036c7

View File

@ -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()) {