fix some issues with paper chat pr#6060
Conversation
Previously, our wrapper for Paper chat events did not account for other plugins modifying the message component during the event lifecycle, this will translate calls between (get/set)Message to and from legacy strings. This further add a barrier hover/click events for now but those never worked with EssXChat installed anyway and will require further refactoring at a later date in order to add support.
|
Tested this (ess 173) with a chat filtering plugin using the Paper AsyncChatEvent. EssentialsXChat seems to work fine. My plugin can change the message and that's what shows up in chat. Canceling messages also works fine. Unfortunately, and this is NOT EssentialsX's fault, a chat filtering plugin which uses the Paper chat events is not compatible with plugins that use the Spigot legacy chat events. The problem is the Spigot event is completely processed before the Paper event fires. So any plugin using the Spigot event sees the unmodified/uncanceled messages. I'm not sure which popular plugins are still using the Spigot legacy chat events. PlotSquared does and they say they won't add support for the Paper event.* I have a chatbot plugin which also uses them. Until every plugin on any particular server uses the Paper chat events, it's useless to have the chat filter use them. Oh well. * "Because for us, it's just a HUGE clusterfuck that probably can't be solved at all." - SirYwell |
A config option was recently added for backwards compatibility with other plugins. Does this work for you? |
Yes, that works fine for EssentialsX with plugins that use the Spigot legacy chat event. JRoy asked me to test this PR with a plugin using the Paper chat event and My other comments were more about the Paper ecosystem and how chat plugins won't work as expected on Paper unless ALL of them are using either the Spigot event or the Paper event. A mix of plugins won't work properly. |
fixes #6059
fixes #6051
fixes #6053
check patch notes
rebase & merge