diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java index d5a2b7cae..09734052d 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/DisplayProtectionListener.java @@ -49,7 +49,7 @@ public class DisplayProtectionListener implements Listener { // } catch (Exception e) {} // } - for (ItemStack is : event.getInventory().getContents()) { + for (ItemStack is : event.getInventory().getStorageContents()) { if (itemStackCheck(is)) { is.setType(Material.AIR); is.setAmount(1); diff --git a/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java index 97eb41ce5..e0045b5ff 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java @@ -50,6 +50,8 @@ public interface DisplayItem { public static boolean checkShopItem(ItemStack itemStack) { + if (itemStack == null) + return false; if (!itemStack.hasItemMeta()) { return false; }