[invalid] API issues
Closed this issue · 0 comments
GeorgeV220 commented
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());
No errors in console.
RoseStacker version 1.5.20
Server info: Current: git-Purpur-2165 (MC: 1.20.4)