Skip to content

Commit 65641d1

Browse files
authored
Only log name instead of full profile for configuration phase disconnects (#13038)
1 parent 49ca2d2 commit 65641d1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,20 @@
2828

2929
@Override
3030
protected GameProfile playerProfile() {
31-
@@ -61,6 +_,11 @@
31+
@@ -61,7 +_,12 @@
3232

3333
@Override
3434
public void onDisconnect(DisconnectionDetails details) {
35+
- LOGGER.info("{} lost connection: {}", this.gameProfile, details.reason().getString());
3536
+ // Paper start - Debugging
3637
+ if (this.server.isDebugging()) {
37-
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile, details.reason().getString(), this.currentTask != null ? this.currentTask.type().id() : "null");
38+
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile.getName(), details.reason().getString(), this.currentTask != null ? this.currentTask.type().id() : "null");
3839
+ } else
3940
+ // Paper end
40-
LOGGER.info("{} lost connection: {}", this.gameProfile, details.reason().getString());
41+
+ LOGGER.info("{} lost connection: {}", this.gameProfile.getName(), details.reason().getString()); // Paper - log name instead of whole profile (as with other similar messages)
4142
super.onDisconnect(details);
4243
}
44+
4345
@@ -71,10 +_,15 @@
4446
}
4547

0 commit comments

Comments
 (0)