inventory-framework
inventory-framework copied to clipboard
Allow paginated item slot be manually changed
First, a few things...
- [X] Is your feature request related to a problem?
- [ ] Will this feature just help you or is it something everyone needs?
- [ ] Have you tried to implement or draft this feature?
- [ ] Is your feature a breaking change?
😄 Describe the solution you'd like
As described here https://github.com/DevNatan/inventory-framework/issues/245#issuecomment-1259535333 there's a need that the slots of paginated items are defined by themselves during their rendering
Allowing use of withSlot
on onItemRender
solves the problem
override fun onItemRender(_: PaginatedViewSlotContext<*>, item: ViewItem, _: *) {
val x: Int = TODO("Developer can define this somehow")
item.withSlot(x)
}
🧠 Describe alternatives you've considered
No response
🤚 Drawbacks
No response
💻 Platform
- [ ] Bukkit
- [ ] Sponge
- [ ] Other
- [X] All
⭐ Version
2.5.4-rc.1
✍️ Additional context
No response