Skip to content

Create a CloseableInventoryCloseEvent for menus #4

@CosimoTiger

Description

@CosimoTiger

Either replace InventoryListener#onClose(InventoryCloseEvent)'s argument, or its implementations', with a proxy class named CloseableInventoryCloseEvent which wraps around a InventoryCloseEvent marked with Lombok's @Delegate annotation, then implement the Cancellable interface.

Another idea is for the CloseableInventoryCloseEvent to be an extension of InventoryCloseEvent and implementation of Cancellable. That would require a new [custom] event to be called.

Once the event arrives in a MenuManager and if isCancelled(), then re-open the inventory menu. This feature could be more intuitive for end users, though I'm not sure how it would be implemented and I think it would introduce a lot of checks and bugs. The main question is how to handle these custom events, their lifecycles, and avoid duplicate calls.

Metadata

Metadata

Assignees

Labels

featureNew feature or request for oneuser storyMutually similar features from an end user's perspective

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions