Muqsit / ChestShop

ChestShop for PocketMine-MP (pmmp)
https://poggit.pmmp.io/ci/Muqsit/ChestShop/ChestShop
68 stars 34 forks source link

Crash when adding more than 45 items in a category. #126

Closed Terpz710 closed 7 months ago

Terpz710 commented 11 months ago

So when you try to add more than 45 items in a category it crashes. Shouldn’t it add it to the next category and then continue?

UnknownNull commented 7 months ago
Error: Cannot add more than 45 entries to a page.
File: plugins/ChestShop-master/src/muqsit/chestshop/category/CategoryPage
Line: 175
Type: OverflowException
Backtrace:
#0 plugins/ChestShop-master/src/muqsit/chestshop/category/Category(57): muqsit\chestshop\category\CategoryPage->addEntry(object muqsit\chestshop\category\CategoryEntry#370458, true)
#1 plugins/ChestShop-master/src/muqsit/chestshop/Loader(151): muqsit\chestshop\category\Category->addEntry(object muqsit\chestshop\category\CategoryEntry#370458)
#2 pmsrc/src/command/PluginCommand(46): muqsit\chestshop\Loader->onCommand(object pocketmine\player\Player#581625, object pocketmine\command\PluginCommand#59470, string[4] shop, array[3])

@Muqsit

Muqsit commented 7 months ago

Hello @Terpz710, @UnknownNull, could you test build 71 (https://poggit.pmmp.io/r/235108/ChestShop_dev-71.phar) and see if that addresses the issue?

Terpz710 commented 7 months ago

@Muqsit That fixed it.