Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Allow responding to cookie requests

Open masmc05 opened this issue 1 year ago • 2 comments

Currently, if a server is awaiting the cookie response, it is impossible to block the request without forcing the server to wait indefinably, as https://jd.papermc.io/velocity/3.4.0/com/velocitypowered/api/event/player/CookieRequestEvent.ForwardResult.html#handled() just discards any requests without sending any responses and there is no api to manually send a response.

The current approach is similar to https://jd.papermc.io/velocity/3.4.0/com/velocitypowered/api/event/player/ServerLoginPluginMessageEvent.html, but if you consider that instead of this, it would be better to add a method in https://jd.papermc.io/velocity/3.4.0/com/velocitypowered/api/proxy/ServerConnection.html to send a response then I would change it

masmc05 avatar Oct 28 '24 12:10 masmc05

Need to update the toString inside of the event

electronicboy avatar Oct 28 '24 14:10 electronicboy

Applied the requested changes

masmc05 avatar Nov 24 '24 14:11 masmc05