Fix getAddress connection check

This commit is contained in:
Nassim Jahnke 2024-06-16 21:31:39 +02:00
parent bff551166c
commit c675152a56

View File

@ -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 {
}
}