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

Item stack ! #135

Open
GabBiswajit opened this issue Feb 23, 2024 · 5 comments
Open

Item stack ! #135

GabBiswajit opened this issue Feb 23, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@GabBiswajit
Copy link

"Hello author,

I've been using your CustomItemLoader plugin to add custom items, and it's been great so far. I've set the maximum stack size for the item to 1, but I've encountered an issue.

I've created a plugin that gives the custom item to players using the following code:

$player->getInventory()->addItem($item);

While this code works initially, if I run it 2 or 3 times, it places the item in the same inventory slot. More Than stack size is 1, After The Item Cross The Stack Size Like More Than 1 Than I'm unable to move the item around in the inventory.

Could you please help me troubleshoot this issue and find a solution to ensure that the items are properly stacked in separate slots each time the code is executed?

Thank you for your assistance."

@GabBiswajit GabBiswajit added the bug Something isn't working label Feb 23, 2024
@GabBiswajit
Copy link
Author

@alvin0319

@alvin0319
Copy link
Owner

Can you show me your config.yml, it seems like max stack size is wrong.

@GabBiswajit
Copy link
Author

GabBiswajit commented Feb 23, 2024

starmenu:
id: 1092
meta: 0
namespace: "custom:starmenu"
name: starmenu
add_creative_inventory: true
max_stack_size: 1
texture: starmenu

@alvin0319
Copy link
Owner

Thanks for providing your config. I found the root cause of issue. However, I'm not able to fix it right now. I will fix it as soon as possible.

@GabBiswajit
Copy link
Author

"Urgent: Players' inventories are stacking due to this issue. Please prioritize fixing this as soon as possible. Thank you!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants