alvin0319/CustomItemLoader

Item stack !

GabBiswajit opened this issue · 5 comments

"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."

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

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

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.

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