Only log name instead of full profile for configuration phase disconnects (#13038)

This commit is contained in:
Jason Penilla
2025-08-29 13:32:10 -07:00
committed by GitHub
parent 49ca2d2d76
commit 65641d1006
@@ -28,18 +28,20 @@
@Override
protected GameProfile playerProfile() {
@@ -61,6 +_,11 @@
@@ -61,7 +_,12 @@
@Override
public void onDisconnect(DisconnectionDetails details) {
- LOGGER.info("{} lost connection: {}", this.gameProfile, details.reason().getString());
+ // Paper start - Debugging
+ if (this.server.isDebugging()) {
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile, details.reason().getString(), this.currentTask != null ? this.currentTask.type().id() : "null");
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile.getName(), details.reason().getString(), this.currentTask != null ? this.currentTask.type().id() : "null");
+ } else
+ // Paper end
LOGGER.info("{} lost connection: {}", this.gameProfile, details.reason().getString());
+ LOGGER.info("{} lost connection: {}", this.gameProfile.getName(), details.reason().getString()); // Paper - log name instead of whole profile (as with other similar messages)
super.onDisconnect(details);
}
@@ -71,10 +_,15 @@
}