Skip to content

Conversation

@JRoy
Copy link
Member

@JRoy JRoy commented Feb 20, 2025

fixes #6059
fixes #6051
fixes #6053

check patch notes

rebase & merge

@JRoy JRoy added type: bugfix PRs that fix bugs in EssentialsX. module: chat Issues or PRs for the EssentialsChat module labels Feb 20, 2025
@JRoy JRoy added this to the 2.21.0 milestone Feb 20, 2025
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.
@JRoy JRoy marked this pull request as ready for review February 20, 2025 21:21
@JRoy JRoy merged commit 5a839c4 into EssentialsX:2.x Feb 20, 2025
1 check passed
@JRoy JRoy deleted the fix/format-npe branch February 20, 2025 21:41
@Bobcat00
Copy link
Contributor

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

@pop4959
Copy link
Member

pop4959 commented Feb 20, 2025

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?

@Bobcat00
Copy link
Contributor

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 paper-chat-events: true, because I had a plugin which changes and cancels messages.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: chat Issues or PRs for the EssentialsChat module type: bugfix PRs that fix bugs in EssentialsX.

Projects

None yet

4 participants