From 16151e3d33a74b9876651bd5ea6f27cc95dd08ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Pitteli=20Gon=C3=A7alves?= Date: Wed, 11 Dec 2024 19:33:16 -0300 Subject: [PATCH] fix remove potions without basedata from grid/storages --- .../io/github/sefiraat/networks/utils/StackUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/sefiraat/networks/utils/StackUtils.java b/src/main/java/io/github/sefiraat/networks/utils/StackUtils.java index d6e6cd1e..ed2ae8a2 100644 --- a/src/main/java/io/github/sefiraat/networks/utils/StackUtils.java +++ b/src/main/java/io/github/sefiraat/networks/utils/StackUtils.java @@ -268,9 +268,13 @@ public boolean canQuickEscapeMetaVariant(@Nonnull ItemMeta metaOne, @Nonnull Ite // Potion if (metaOne instanceof PotionMeta instanceOne && metaTwo instanceof PotionMeta instanceTwo) { - if (!instanceOne.getBasePotionData().equals(instanceTwo.getBasePotionData())) { - return true; + + if((instanceOne.getBasePotionData() != null) && (instanceTwo.getBasePotionData() != null)) { + if (!instanceOne.getBasePotionData().equals(instanceTwo.getBasePotionData())) { + return true; + } } + if (instanceOne.hasCustomEffects() != instanceTwo.hasCustomEffects()) { return true; }