From c675152a567d8c7f559ee2f792f8a77314e5ea7f Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 16 Jun 2024 21:31:39 +0200 Subject: [PATCH] Fix getAddress connection check --- .../Added-API-to-get-player-ha-proxy-address.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/server/Added-API-to-get-player-ha-proxy-address.patch b/patches/server/Added-API-to-get-player-ha-proxy-address.patch index 2fd8738c08..ca738005ab 100644 --- a/patches/server/Added-API-to-get-player-ha-proxy-address.patch +++ b/patches/server/Added-API-to-get-player-ha-proxy-address.patch @@ -38,6 +38,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + + @Override + public InetSocketAddress getAddress() { +- if (this.getHandle().connection.protocol() == null) return null; ++ if (this.getHandle().connection == null) return null; + + SocketAddress addr = this.getHandle().connection.getRemoteAddress(); + if (addr instanceof InetSocketAddress) { @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } }