mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed NPE when clicking outside of the inventory window
This commit is contained in:
parent
6702256b4c
commit
d39ff036c7
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user