From bfd15e1a816b0928d51abef03333166ecc225358 Mon Sep 17 00:00:00 2001 From: Timon Seidel Date: Sun, 31 Aug 2025 17:14:32 +0200 Subject: [PATCH] fix: kick logging ignoring config (#1636) --- .../proxy/connection/client/ConnectedPlayer.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 1fb3884b..6d32535f 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -733,15 +733,19 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player, Component disconnectReason = disconnect.getReason().getComponent(); String plainTextReason = PASS_THRU_TRANSLATE.serialize(disconnectReason); if (connectedServer != null && connectedServer.getServerInfo().equals(server.getServerInfo())) { - logger.info("{}: kicked from server {}: {}", this, server.getServerInfo().getName(), - plainTextReason); + if (this.server.getConfiguration().isLogPlayerConnections()) { + logger.info("{}: kicked from server {}: {}", this, server.getServerInfo().getName(), + plainTextReason); + } handleConnectionException(server, disconnectReason, Component.translatable("velocity.error.moved-to-new-server", NamedTextColor.RED, Component.text(server.getServerInfo().getName()), disconnectReason), safe); } else { - logger.error("{}: disconnected while connecting to {}: {}", this, - server.getServerInfo().getName(), plainTextReason); + if (this.server.getConfiguration().isLogPlayerConnections()) { + logger.error("{}: disconnected while connecting to {}: {}", this, + server.getServerInfo().getName(), plainTextReason); + } handleConnectionException(server, disconnectReason, Component.translatable("velocity.error.cant-connect", NamedTextColor.RED, Component.text(server.getServerInfo().getName()),