mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-29 06:35:28 +01:00
📦 bundle nbt fix
Took 1 minute
This commit is contained in:
parent
62b2992018
commit
70cb0f8b64
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user