feat: add PlayerBundleItemSelectEvent#13898
Conversation
|
This pretty much enables listening for scrolling above an item. Here are some usage examples for this event: rules.mp4item_browser.mp4 |
|
I think it may be better to view this as an inventory event? As then you can instead act on a slot in an inventory so this can be better used in inventory guis. Also, exposing the previous selected slot would be nice. |
|
Inventory event does make more sense as the supertype for this event: PlayerBundleItemSelectEvent now inherits InventoryEvent. Added slot and previous index/item fields. |
|
|
|
I now moved all of the firing logic to the craft event factory; not sure how the logic could have been split up. |
|
I was thinking: would it maybe be a good addition for the event to expose a getSelectionDelta / getScrollDirection method to simplify the GUI scrolling handling? I'm guessing this event will mainly be used for GUI-related stuff anyway. |
Adds a new event that is called when a player selects an item in a bundle.