Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Use PluginMessage to allow Velocity to cancel signed chat and commands

Open Joo200 opened this issue 2 years ago • 2 comments

This patch adds a custom payload handler in ServerGamePacketListenerImpl to handle cancelled commands and cancelled chat messages from the proxy.

My current implementation wraps the cancelled packet into a plugin message, protocol changes will be handled by the updated implementation in Minecraft code and Velocity.

This is a draft and can/should be used for https://github.com/PaperMC/Velocity/pull/1100 and possible for Waterfall/BungeeCord.

Joo200 avatar Oct 12 '23 13:10 Joo200

for a good while, I've wanted the means to "handshake" between the proxy and the server some form of capability -esque sysem, that way the proxy and the server can see if they support this stuff, i.e. we can detect if we're able to tell the server that chat cycled rather than just having to assume it based on proto version or whatever, but, I did kinda get veto'd on this, so, idk

electronicboy avatar Oct 12 '23 14:10 electronicboy

Yes, that's some open todo for velocity. For Paper it should be fine to listen to those plugin messages because there is no active logic that changes behavior.

Maybe we should just add it as config option to the velocity config and send that package then.

Joo200 avatar Oct 12 '23 14:10 Joo200