Procedure to get server ping / latency?

Started by SnailsAttack on

Topic category: Help with modding (Java Edition)

Last seen on 08:12, 18. May 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure to get server ping / latency?

Is there a way to obtain a player's latency in milliseconds with the internal or external server? There's some features in my mod that work poorly when the player's connection to the server take longer than about a half second to sync, and I'd like to be able to detect and disable certain behaviors when the player is lagging.