Events #77
BomBardyGamer
started this conversation in
Ideas
Events
#77
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The event API is, like a lot of other parts of the API, a bit messy, and stolen from somewhere else. This was one of two things I took from Velocity, the plugin API being the other. I want to keep the plugin API we have at the moment, as I don't really have any better ideas, but I do want to make some changes to the event API, as it is based on an older version of Velocity's current API, and Andrew (astei) has already addressed many issues with the concurrent-first approach it takes.
The approach was first introduced as an idiot proofing mechanism, to avoid people blocking the main execution thread/event loop when executing their event code. For a while, I have wanted to port more of Velocity's event API in the newer versions, but I'm getting a bit fed up of this project just becoming an amalgamation of good parts of other things.
So, I'm again asking the community for help designing a new event API. I don't exactly know where I want to go with this one, though I feel that one of the good things we could take from Velocity's current API is supporting a coroutine-based approach with continuations. I was also tempted to take parts from Minestom's event API, but again, I'm fed up with just giving up and copying others' work.
If you guys have any suggestions, or things you would like to see in a new and improved event API, please do comment them below.
Beta Was this translation helpful? Give feedback.
All reactions