3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 12:00:06 +01:00

Fix getAddress connection check

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-06-16 21:31:39 +02:00
Ursprung 167961e744
Commit 106dbae220
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
3 geänderte Dateien mit 12 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -35,9 +35,18 @@ index 96355e1da8feb6687ea0069dda4a82fcd7e25e8a..1f696644b958538e9f5d568a2e4bba69
} else {
super.channelRead(ctx, msg);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8d697782fae536377ac29acf967c764ee8a7951a..e41b7191d0cebeb77b8d07a1b5bddc1b695cb922 100644
index 8d697782fae536377ac29acf967c764ee8a7951a..33541edc8bb2d673342448046fa29767f171bbf3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -265,7 +265,7 @@ 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) {
@@ -275,6 +275,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

Datei anzeigen

@ -28629,7 +28629,7 @@ index 8f88ccec6b8947ca2738dc07c23aebe258145c83..cdc704364cf339084537d089e654f607
// Paper start - implement pointers
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e41b7191d0cebeb77b8d07a1b5bddc1b695cb922..ecd975855d92ae5948ee926f42396cb004843aed 100644
index 33541edc8bb2d673342448046fa29767f171bbf3..1bc343df0e7b8e6e3fadc970a4a4c8d787d93828 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3491,12 +3491,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -20,7 +20,7 @@ index dba09cb32844533c383635e7623f5180a468f636..a88c7113652b268c0fdc355710b00f45
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ecd975855d92ae5948ee926f42396cb004843aed..c868abef790aa80863721490f69087343aba13e7 100644
index 1bc343df0e7b8e6e3fadc970a4a4c8d787d93828..7eea190ce8a62960ecc42ff56a4ef71b754184fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3483,6 +3483,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {