Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow-direct-hat cannot easily be cancelled by other plugins #5706

Open
datatags opened this issue Feb 24, 2024 · 0 comments
Open

allow-direct-hat cannot easily be cancelled by other plugins #5706

datatags opened this issue Feb 24, 2024 · 0 comments
Assignees
Labels
type: problem Problems that are not strictly bugs.

Comments

@datatags
Copy link

Type of bug

Compatibility issue, Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=c0797e17a0d74bf5a75a63de5a9e9ddc

Error log (if applicable)

No response

Bug description

Essentials' allow-direct-hat cannot be easily cancelled by other plugins.
While the listener (see here) does ignore cancelled events, Essentials may still swap the items before any other plugin is notified of the event since it listens at the lowest priority.

Steps to reproduce

I haven't yet done this experiment, but from looking at Bukkit's event handler code, any plugin that registers a listener for InventoryClickEvent, even at lowest priority, will still only get to handle it after Essentials if the plugin registered its listener after Essentials.

Expected behaviour

Essentials should provide a way to cancel this behavior, for example by increasing the listener priority or firing a secondary event that other plugins could cancel.

Actual behaviour

Essentials does not do this, so it's difficult for other plugins to do anything about this behavior.

@datatags datatags added the bug: unconfirmed Potential bugs that need replicating to verify. label Feb 24, 2024
@pop4959 pop4959 self-assigned this Feb 24, 2024
@pop4959 pop4959 added type: problem Problems that are not strictly bugs. and removed bug: unconfirmed Potential bugs that need replicating to verify. labels Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: problem Problems that are not strictly bugs.
Projects
None yet
Development

No branches or pull requests

2 participants