Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api for determine itemstack amount #90

Open
dio2282 opened this issue Nov 26, 2023 · 1 comment
Open

Api for determine itemstack amount #90

dio2282 opened this issue Nov 26, 2023 · 1 comment

Comments

@dio2282
Copy link

dio2282 commented Nov 26, 2023

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
Copy link
Collaborator

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");

@LoneDev6 LoneDev6 added the api label Nov 27, 2023
@LoneDev6 LoneDev6 moved this to Todo in Other plugins Nov 27, 2023
@LoneDev6 LoneDev6 changed the title [Suggestion] Api for determine itemstack amount Api for determine itemstack amount Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants