This commit is contained in:
Rammelkast committed 2021-07-02 18:00:46 +02:00
1 parent a3ae0ab967
commit 0438c36cce
1 file changed
+5
@@ -96,6 +96,11 @@ public class VersionUtil {
}
public static int getPlayerPing(final Player player) {
// May be called with offline (null) player
if (player == null) {
return -1;
}
if (!CURRENT_VERSION.isAtLeast(MinecraftVersion.CAVES_CLIFFS_1)) {
try {
final Object entityPlayer = player.getClass().getMethod("getHandle").invoke(player);