mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 06:28:52 +00:00
Fix #156
This commit is contained in:
1 parent
a3ae0ab967
commit
0438c36cce
1 file changed
+5
@@ -96,6 +96,11 @@ public class VersionUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int getPlayerPing(final Player player) {
|
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)) {
|
if (!CURRENT_VERSION.isAtLeast(MinecraftVersion.CAVES_CLIFFS_1)) {
|
||||||
try {
|
try {
|
||||||
final Object entityPlayer = player.getClass().getMethod("getHandle").invoke(player);
|
final Object entityPlayer = player.getClass().getMethod("getHandle").invoke(player);
|
||||||
|
|||||||
Reference in new issue
Block a user