-
Notifications
You must be signed in to change notification settings - Fork 33
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
Async message processing. #91
Comments
All you should need to do is check I can PR this if you want |
Yes, that's true, but there's a pr that changes some stuff (the one that cancels AsyncChatEvent when ChatChatEvent is cancelled) so idk. I really can't be bothered to think rn. If you think you can make it work with that PR, then sure. |
So I've done some work on this and as far as I can tell it's not going to be possible to make it work the way it needs to. If If I believe the only way to ensure that the processing is always completed async is to cancel the I believe |
We can't cancel the APCEvent. That's because plugins like DiscordSRV, listen to that event with the MONITOR priority. I knew this will be an issue that's why I didn't take on this task yet. Also the addition of bungee support will require us to completely redo the MessageProcessor class since right now it is a mess. Btw we only take the result from the process method which tells us if the event should continue running or if it should be cancelled. |
There are some instances where the AsyncPlayerChatEvent isn't actually async which means all the message processing is done on the main thread. I believe this happens when the player's message is sent using the spigot api but possible in other instances as well. We need to detect those instances and execute the code on another thread.
The text was updated successfully, but these errors were encountered: