mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Fix NPE
Former-commit-id: 37d12f83111e6209a14de0727ee5d03a0eb18b34 [formerly 4760f41e01ff7e51a38d341fe1c2d9dfc9db8693] Former-commit-id: ff187c180a0c62f351e3bcae32651244ee066af2
This commit is contained in:
1 parent
927bb4a52b
commit
00a02ca9c0
2 files changed
+3
-1
No files matched your search
@@ -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);
|
||||
|
||||
@@ -50,6 +50,8 @@ public interface DisplayItem {
|
||||
|
||||
|
||||
public static boolean checkShopItem(ItemStack itemStack) {
|
||||
if (itemStack == null)
|
||||
return false;
|
||||
if (!itemStack.hasItemMeta()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user