`allow-direct-hat` cannot easily be cancelled by other plugins
datatags opened this issue ยท 0 comments
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.