SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.58k stars 1.11k forks source link

add simple login payload api #3736

Closed Outfluencer closed 2 months ago

Outfluencer commented 2 months ago

With this api you can send a login payload and retrive the response of it with the same method.

It can be used for custom clients. It could also be used to filter invalid clients that do not response.

If a packet was not requested an exception is thrown.

I made use of the CompletableFutures again.

md-5 commented 2 months ago

Do login payloads necessarily have a response?

Outfluencer commented 2 months ago

As i know yes.

"Used to implement a custom handshaking flow together with Login Plugin Response. Unlike plugin messages in "play" mode, these messages follow a lock-step request/response scheme, where the client is expected to respond to a request indicating whether it understood. The notchian client always responds that it hasn't understood, and sends an empty payload." ~Protocol Wiki