#833: Add Player#getPing to access the player's ping

By: retrooper <retrooperdev@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2021-05-09 17:20:53 +10:00
parent 6f87ada41c
commit 165c8596d8

View File

@ -1677,6 +1677,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : getHandle().clientViewDistance;
}
@Override
public int getPing() {
return getHandle().ping;
}
@Override
public String getLocale() {
return getHandle().locale;