Zrips / CMI

115 stars 97 forks source link

[CMILib?] Players kicked on chat click events that run commands as the player with Velocity #8434

Open mercurialmusic opened 8 months ago

mercurialmusic commented 8 months ago

Description of Issue

This is... probably an annoying one for you. It certainly is for us. We recently moved to Velocity from Waterfall, which has been... fun. But now players are being kicked when clicking on any chat elements that run commands as that player, such as the green check for tpaccept, or any pagination anywhere within CMI (colorpicker, ctext, etc.), Jobs (pagination in jobs info), same for any holos or IC that run asPlayer!.

In the logs we only get (e.g.):

[14:33:21] [Server thread/INFO]: .AmDuhOwll issued server command: /tpa bookender
[14:33:30] [Netty Epoll Server IO #0/WARN]: Failed to validate message acknowledgements from Bookender
[14:33:30] [Server thread/INFO]: Bookender lost connection: Chat message validation failure

We've tried a few things including SignedVelocity (both with and without), even UnsignedVelocity, but with SignedVelocity it actually says on startup that CMILib, Jobs, CMI, Residence, and TradeMe all have "listener in legacy org.bukkit.event.player.AsyncPlayerChatEvent event" and to "report to the author to use Paper's AsyncChatEvent and/or AsyncChatDecorateEvent", in case that's useful?

Possibly of note, we had been using CMI as a fallback for our old chat plugin which we eventually replaced with Carbon Chat (we really need those chat channels). We didn't notice these validation kick errors while CMI's chat was active -- it was only after disabling CMI chat that they started to pop up.

Thanks for any advice!

Version Information

CMI plugin version: 9.6.10.0 Velocity CMIB  SqLite
CMILib: 1.4.4.8 
Server: Paper(398) 1.20.4-R0.1-SNAPSHOT-
MI economy: Enabled Vault: 1.7.3-b CMI Chat: Disabled 
Modules -> 57 enabled 2 disabled: ranks, skin

Errors

No response

Relevant Config Sections

Chat:
  # Will try to modify chat to display it in defined format
  ModifyChatFormat: false
  # When set to true, regular and private messages (excludes clean messages) will have additional information when hovering over it (PlaceHolderAPI supported) and can be clicked for quick reply option
  # To change default hover over messages seen on sent message, go to your locale file to Chat section
  ClickHoverMessages: false

Relevant Plugins

No response

Agreements

mercurialmusic commented 8 months ago

After speaking with the Paper/Velocity team we were able to mitigate this using FreedomChat, but that of course removes all chat signing. Will leave the issue open in case it's still a compatibility thing if you're interested in working on that, but up to you of course.