MinusKube / SmartInvs

Advanced Inventory API for your Minecraft Bukkit plugins.
https://minuskube.gitbook.io/smartinvs/
Apache License 2.0
263 stars 65 forks source link

InventoryOpener's fill method does not work for some inventory types #187

Open ImDxni opened 3 years ago

ImDxni commented 3 years ago

Hi, i was trying to do stuffs with SmartInvs, i was using the Dropper InventoryType and i found a problem. In the InventoryOpener interface, the default method fill (that is called by SpecialInventoryOpener) uses this code:

fill method

But this code can be used only for inventories with 9 columns, so inventorytypes like dropper aren't supported by this fill method, if you try to add an item in a dropper it gives error because of the plugin treats the inventory as if it has 9 columns (IndexOutOfBoundsException)

MinusKube commented 3 years ago

Indeed, it is a problem. I think you can currently workaround this by giving a size of 1 row and 9 columns to the inventory, but this is not very intuitive.

ImDxni commented 3 years ago

I directly rewrited the fill method