Is your feature request related to a problem?
Currently, Bukkit provides the method PluginLoader#createRegisteredListeners as public API. With the deprecation of plugin loaders this method has been moved to PaperEventManager#createRegisteredListeners but there isn't any way to access it from the API, as it's an internal class. This technically breaks Bukkit compatibility but i guess that was a given with the deprecation of PluginLoader.
Describe the solution you'd like.
It would be useful to put createRegisteredListeners back in public API (in whichever class would be the most convenient) as it allows access to the event listener method parsing logic that is used to create EventExecutors, allowing plugins to create custom EventExecutors delegating to "normal" ones without having to rewrite all the EventHandler annotation and method signature parsing logic.
Describe alternatives you've considered.
The alternative for the specific case i mentioned is for each plugin that needs a custom EventExecutor to reimplement the parsing logic (which afaik is what most plugins that need this functionality are currently doing) but:
- This approach needs at best constant changes if the built in logic gets updated, and at worst breaks if the changes are substantial.
- It also duplicates logic, which in general isn't the best of things.
Other
IMHO as this was already public API in Bukkit, even if it wasn't used much, and because although it was moved it still exists in the codebase (and is used internally) I don't see any reason not to have it be public for the limited but existing use cases for plugins.
Is your feature request related to a problem?
Currently, Bukkit provides the method PluginLoader#createRegisteredListeners as public API. With the deprecation of plugin loaders this method has been moved to PaperEventManager#createRegisteredListeners but there isn't any way to access it from the API, as it's an internal class. This technically breaks Bukkit compatibility but i guess that was a given with the deprecation of PluginLoader.
Describe the solution you'd like.
It would be useful to put
createRegisteredListenersback in public API (in whichever class would be the most convenient) as it allows access to the event listener method parsing logic that is used to create EventExecutors, allowing plugins to create custom EventExecutors delegating to "normal" ones without having to rewrite all the EventHandler annotation and method signature parsing logic.Describe alternatives you've considered.
The alternative for the specific case i mentioned is for each plugin that needs a custom EventExecutor to reimplement the parsing logic (which afaik is what most plugins that need this functionality are currently doing) but:
Other
IMHO as this was already public API in Bukkit, even if it wasn't used much, and because although it was moved it still exists in the codebase (and is used internally) I don't see any reason not to have it be public for the limited but existing use cases for plugins.