Closed 2lay closed 3 weeks ago
@2lay Did u put it on index 27? Indexing starts at 0 so the 27th slot would be position 26...
No, I am using render.lastSlot
, or setting it to the 26'th slot.
@2lay I'm not being able to reproduce. Both slot(26, [...])
(slot(27)
will fail) and lastSlot([...])
with config.size(3)
or config.size(27)
on container config works fine.
onRender's context slot(x)
is index-based so I recommend you to check container size before adding it otherwise it will throw an exception. You can use render.getContainer()
to access container settings.
Is there an existing issue for this?
🐛 Describe the bug
Plugin throws an
ArrayIndexOutOfBoundsException
error when trying to set an item on the 27'th / last slot.Stack Trace:
✔️ Expected behavior
GUI is supposed to open and show an item on the 27'th / last slot.
👣 Steps to Reproduce
render.slot
orrender.lastSlot
method.ArrayIndexOutOfBoundsException
error.💻 Platform
⭐ Server Version
1.21.1
📚 Library Version
3.0.11
✍️ Additional context
No response