Rosewood-Development / RoseStacker

A next-generation stacker plugin for Spigot and Paper servers
Other
137 stars 35 forks source link

[invalid] API issues #109

Closed GeorgeV220 closed 4 months ago

GeorgeV220 commented 4 months ago

I'm trying to get the actual amount of a stacked Item but for some reason stacked item entities return null.

        StackedItem stack = RoseStackerAPI.getInstance().getStackedItem(item);
        if (stack == null) {
            Bukkit.getLogger().info("StackedItem is null");
        } else {
            Bukkit.getLogger().info("StackedItem item: " + stack.getItem());
            Bukkit.getLogger().info("StackedItem stack: " + stack.getStackSize());
        }
        return BigInteger.valueOf(stack == null ? item.getItemStack().getAmount() : stack.getStackSize());

image No errors in console. RoseStacker version 1.5.20 Server info: Current: git-Purpur-2165 (MC: 1.20.4)