diff --git a/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java b/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java index 138dcafc..915c16d1 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java +++ b/eco-api/src/main/java/com/willfp/eco/core/fast/FastItemStack.java @@ -116,13 +116,6 @@ public interface FastItemStack { */ boolean hasItemFlag(@NotNull ItemFlag flag); - /** - * Get if the item has any nbt data. - * - * @return If any nbt data is present on the item. - */ - boolean hasAnyNBT(); - /** * Get the Bukkit ItemStack again. * diff --git a/eco-api/src/main/java/com/willfp/eco/core/items/Items.java b/eco-api/src/main/java/com/willfp/eco/core/items/Items.java index ec85632b..6b2ecad8 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/items/Items.java +++ b/eco-api/src/main/java/com/willfp/eco/core/items/Items.java @@ -2,7 +2,6 @@ package com.willfp.eco.core.items; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.LoadingCache; -import com.willfp.eco.core.fast.FastItemStack; import com.willfp.eco.core.items.args.LookupArgParser; import com.willfp.eco.core.items.provider.ItemProvider; import com.willfp.eco.core.recipe.parts.EmptyTestableItem; @@ -43,10 +42,10 @@ public final class Items { * Cached custom item lookups, using {@link HashedItem}. */ private static final LoadingCache> CACHE = Caffeine.newBuilder() - .expireAfterAccess(5, TimeUnit.MINUTES) + .expireAfterAccess(10, TimeUnit.MINUTES) .build( key -> { - if (!FastItemStack.wrap(key.getItem()).hasAnyNBT()) { + if (!key.getItem().hasItemMeta()) { return Optional.empty(); } diff --git a/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/fast/EcoFastItemStack.kt b/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/fast/EcoFastItemStack.kt index be7f7d55..c29e3958 100644 --- a/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/fast/EcoFastItemStack.kt +++ b/eco-core/core-nms/nms-common/src/main/kotlin/com/willfp/eco/internal/spigot/proxy/common/fast/EcoFastItemStack.kt @@ -170,10 +170,6 @@ class EcoFastItemStack( handle.setRepairCost(cost) } - override fun hasAnyNBT(): Boolean { - return handle.hasTag() - } - override fun equals(other: Any?): Boolean { if (other !is EcoFastItemStack) { return false