📦 bundle nbt fix

Took 1 minute
This commit is contained in:
Kiran Hart 2024-03-22 15:04:34 -04:00
parent 62b2992018
commit 70cb0f8b64
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3

View File

@ -35,6 +35,7 @@ import java.util.function.Function;
public final class BundleUtil { public final class BundleUtil {
public boolean isBundledItem(@NonNull final ItemStack itemStack) { public boolean isBundledItem(@NonNull final ItemStack itemStack) {
if (itemStack == null || itemStack.getType() == XMaterial.AIR.parseMaterial() || itemStack.getAmount() == 0) return false;
final boolean hasBundleTag = NBT.get(itemStack, nbt -> (boolean) nbt.hasTag("AuctionBundleItem")); final boolean hasBundleTag = NBT.get(itemStack, nbt -> (boolean) nbt.hasTag("AuctionBundleItem"));
return itemStack.getType() != XMaterial.AIR.parseMaterial() && hasBundleTag; return itemStack.getType() != XMaterial.AIR.parseMaterial() && hasBundleTag;
} }