Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle LoginPayloadResponse in UpstreamBridge #3758

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

Outfluencer
Copy link
Collaborator

@Outfluencer Outfluencer commented Oct 26, 2024

also change a little check for loginpayloads sendData method
it should only be possible to use this method while in login phase.

I moved the setHandler down because if in the PostLoginEvent a method is invoked that utilizeses login api. the packets will be handled in the UpstreamBridge and not in the initial handler, so the api will not function as expected

also change a little check for loginpayloads
it should only be possible to use this method while in login phase.
@Outfluencer
Copy link
Collaborator Author

in my case i try to use the sendData method of the pendingConnection in the post login event for latest client version, it should work as the connection is in login state. But the LoginPayloadResponse is handled in the upstream bridge, thats why it doesnt work

@md-5
Copy link
Member

md-5 commented Nov 17, 2024

But the PostLoginEvent has a UserConnection not a PendingConnection?

@Outfluencer
Copy link
Collaborator Author

Yeah but i get the pending connection of the userconnection

@md-5
Copy link
Member

md-5 commented Nov 17, 2024

Why?

@Outfluencer
Copy link
Collaborator Author

Outfluencer commented Nov 17, 2024

Because i want to make use of the loginpayload api

Everything should work but the packet handler for the loginpayload response is only in the initial handler, so i need to move the code down or impl it in the upstreambridge to fallback to the initialhandler

Which might be better

@Outfluencer Outfluencer changed the title Move setHandler UpstreamBridge into the PostLoginEvent callback Handle LoginPayloadResponse in UpstreamBridge Nov 17, 2024
@md-5 md-5 merged commit f6b40b1 into SpigotMC:master Nov 19, 2024
4 checks passed
JonnygamingTv added a commit to JonnygamingTv/BungeeCord that referenced this pull request Nov 19, 2024
SpigotMC#3758: Handle LoginPayloadResponse in UpstreamBridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants