Geyser icon indicating copy to clipboard operation
Geyser copied to clipboard

Add support for Java server EntityPlayer#latency field

Open AuroraLS3 opened this issue 1 year ago • 2 comments

What feature do you want to see added?

I got a feature request to improve data gathering for player latency (https://github.com/plan-player-analytics/Plan/issues/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 avatar Jan 04 '24 18:01 AuroraLS3

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.

onebeastchris avatar Jan 04 '24 18:01 onebeastchris

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

AuroraLS3 avatar Jan 06 '24 16:01 AuroraLS3

Implemented a ping api in https://github.com/GeyserMC/Geyser/pull/4862. Thanks for the suggestion!

onebeastchris avatar Aug 01 '24 01:08 onebeastchris