Closed FerusGrim closed 4 years ago
Looks ok - I just wonder whether better behaviour would be to cancel the event - to keep the current GUI open?
I'd assume the expected behavior of opening an inventory with a pre-existing inventory already open would be for the new inventory to take priority.
Yeah that's fair
Thank you! :)
On
InventoryCloseEvent
, always invalidate the GUI if it's still valid and then only continue on if the inventory being closed is the GUI.On
InventoryOpenEvent
, if the inventory that is being opened is not the GUI and the GUI is valid, invalidate it.