Solved Finding a players ping?

Discussion in 'Plugin Development' started by GrandmaJam, Jan 21, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    GrandmaJam

    Hello, I'm currently making a /ping command and am wondering how to find the senders ping.

    Example: Your ping is: 69ms
     
  2. Offline

    sethrem

    Not sure but I thought minecraft player to sever pings were measured in ticks like tps, like 19.99 is the max tps. If I was on my pc I would help you :p. I'll help you tomorrow if still in answered.
     
    GrandmaJam likes this.
  3. Offline

    1Rogue

    Get their IP address and manually ping it. (In Java, you'd require a message on a socket to port 7).
     
    GrandmaJam likes this.
  4. @GrandmaJam
    Code:
    Player somePlayer = ...;
    int ping = ((CraftPlayer) somePlayer).getHandle().ping;
     
    GrandmaJam likes this.
  5. Offline

    GrandmaJam

Thread Status:
Not open for further replies.

Share This Page