Skip to content

Commit 15e86f1

Browse files
committed
check component regardless of material
1 parent 5c68686 commit 15e86f1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

shared/src/main/java/me/xginko/aef/utils/BundleUtil.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ public class BundleUtil {
2323
@Nullable
2424
@Unmodifiable
2525
public static List<ItemStack> getBundleContent(@NotNull ItemStack itemStack) {
26-
if (itemStack.getType() != XMaterial.BUNDLE.get()) {
27-
return null;
28-
}
29-
3026
if (DataComponentUtil.COMPONENTS_SUPPORTED) {
31-
return DataComponentUtil.getBundleContent(itemStack);
27+
List<ItemStack> content = DataComponentUtil.getBundleContent(itemStack);
28+
if (content != null) return content;
3229
}
3330

34-
if (itemStack.hasItemMeta()) {
31+
if (itemStack.getType() == XMaterial.BUNDLE.get() && itemStack.hasItemMeta()) {
3532
return ((BundleMeta) itemStack.getItemMeta()).getItems();
3633
}
3734

0 commit comments

Comments
 (0)