NichtStudioCode / InvUI

A spigot library for creating custom inventory-based GUIs.
MIT License
242 stars 19 forks source link

expose gui instance on click event handler for items. #34

Closed portlek closed 1 year ago

portlek commented 1 year ago

i want to be able to remove an item from a scroll gui when i click an item where's in the content itself. but i don't have access to gui instance while the player clicking the item.

here

NichtStudioCode commented 1 year ago

Hi, InvUI is designed in a way that Items are generally not aware of the Gui they're placed in. You can use ControlItems, which are an exception to that rule. Otherwise, store the Gui instance somewhere else.