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

Add support for Java server EntityPlayer#latency field #4379

Closed
AuroraLS3 opened this issue Jan 4, 2024 · 3 comments · Fixed by #4131
Closed

Add support for Java server EntityPlayer#latency field #4379

AuroraLS3 opened this issue Jan 4, 2024 · 3 comments · Fixed by #4131
Labels
Feature Request A feature request.

Comments

@AuroraLS3
Copy link

What feature do you want to see added?

I got a feature request to improve data gathering for player latency (plan-player-analytics/Plan#3395) - currently on Java+Geyser server the player latency field is not updated on Java server side and is 0ms at all times.

Possibly related: #4131

Are there any alternatives?

Alternative could be to implement a FloodgatePlayer#getPing method which I can call, though I'm not 100% sure of the setup the user requesting the data has (Is Floodgate even required on the Java server?). They might have Geyser in front of a game server in which case some packet is missing from the Geyser proxy-Java server communication.

@AuroraLS3 AuroraLS3 added the Feature Request A feature request. label Jan 4, 2024
@onebeastchris
Copy link
Member

Yeah, the linked PR would add the player ping/latency to the Geyser API. There's no plan to expose it in the floodgate api at the moment though

One thing that might work in the meantime would be to enable forward-player-ping in the Geyser config, that should properly forward the ping to the java server; but that can lead to Bedrock clients timing out more quickly.

@AuroraLS3
Copy link
Author

Alright I have given the forward-player-ping as an option for the request - I think it is more what they are after since my plugin doesn't support Geyser API directly, only through Floodgate, so the ping needs to be available on the java server for my plugin to detect it

@onebeastchris
Copy link
Member

Implemented a ping api in #4862. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants