PluginBugs / Issues-ServerBooster

Repository used to keep track of issues of my plugin ServerBooster
2 stars 0 forks source link

Api for determine itemstack amount #90

Open dio2282 opened 11 months ago

dio2282 commented 11 months ago

Is your feature request related to a problem? Please describe. when I use a minion plugin ( litminion ) and I drop 128x stone but it detects 64x

Describe the solution you'd like Maybe u can release API to determine the item stack amount so the developer can add support for server booster

LoneDev6 commented 10 months ago

Definitely a good idea. Anyway you can use NBT API and check for the special NBT tag which contains this information.

final NBTItem nbtItem = new NBTItem(itemStack);

if(!nbtItem.hasNBTData())
    return;
if(!nbtItem.hasKey("SBAmount"))
    return;

final int amount = nbtItem.getInteger("SBAmount");