3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Add invalid player data to misc debug dumps

Dieser Commit ist enthalten in:
Shane Freeder 2021-06-20 15:06:37 +01:00
Ursprung 24880b9a4f
Commit 33d6b6fbcd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
3 geänderte Dateien mit 19 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -57,6 +57,22 @@ index 127691d19e02ef5e725ce338d732fcced428fa66..7c1ae542ea9da28ccc40b4608a970ef0
// Paper end
this.running = false;
if (flag) {
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index b8fb3f99e4af5768d8afc1b143e5585f08cc21a9..17a171f531c356e2c8abe2f26c012e9bdcfa9879 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -200,6 +200,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
}
} catch (Exception exception) {
TranslatableComponent chatmessage = new TranslatableComponent("multiplayer.disconnect.invalid_player_data");
+ // Paper start
+ if (MinecraftServer.getServer().isDebugging()) {
+ exception.printStackTrace();
+ }
+ // Paper end
this.connection.send(new ClientboundDisconnectPacket(chatmessage));
this.connection.disconnect(chatmessage);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4739b4c3035064de328595329ee0b65ea59e559b..989b6b91dc046e20332f0cef35105b290fdb2e43 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add raw address to AsyncPlayerPreLoginEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index b8fb3f99e4af5768d8afc1b143e5585f08cc21a9..9e9f0fb1dd6b9a92bd84c50ebdbd79beaf45b58c 100644
index 17a171f531c356e2c8abe2f26c012e9bdcfa9879..5d26417b5d4e182fdefdf1ef5c81a0b7d7f2d4c1 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -346,12 +346,13 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -351,12 +351,13 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
// Paper end
String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName();
java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress();

Datei anzeigen

@ -14,7 +14,7 @@ This fixes two instances:
be provided for two new values (WITHOUT changing behavior).
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 7684f0146fa522287d223d4b3cb1c999458b872e..3d1e1cb8a1ca32e11ccea7e554827cf88dd28c1b 100644
index 9ddedd310eb0323a5a09f51a61bfb7b36503be93..a4f4a2e14e0a6348360ad99734730c1e3513da9e 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -718,4 +718,70 @@ public final class MCUtil {