fix: kick logging ignoring config (#1636)
This commit is contained in:
@@ -733,15 +733,19 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
|
|||||||
Component disconnectReason = disconnect.getReason().getComponent();
|
Component disconnectReason = disconnect.getReason().getComponent();
|
||||||
String plainTextReason = PASS_THRU_TRANSLATE.serialize(disconnectReason);
|
String plainTextReason = PASS_THRU_TRANSLATE.serialize(disconnectReason);
|
||||||
if (connectedServer != null && connectedServer.getServerInfo().equals(server.getServerInfo())) {
|
if (connectedServer != null && connectedServer.getServerInfo().equals(server.getServerInfo())) {
|
||||||
|
if (this.server.getConfiguration().isLogPlayerConnections()) {
|
||||||
logger.info("{}: kicked from server {}: {}", this, server.getServerInfo().getName(),
|
logger.info("{}: kicked from server {}: {}", this, server.getServerInfo().getName(),
|
||||||
plainTextReason);
|
plainTextReason);
|
||||||
|
}
|
||||||
handleConnectionException(server, disconnectReason,
|
handleConnectionException(server, disconnectReason,
|
||||||
Component.translatable("velocity.error.moved-to-new-server", NamedTextColor.RED,
|
Component.translatable("velocity.error.moved-to-new-server", NamedTextColor.RED,
|
||||||
Component.text(server.getServerInfo().getName()),
|
Component.text(server.getServerInfo().getName()),
|
||||||
disconnectReason), safe);
|
disconnectReason), safe);
|
||||||
} else {
|
} else {
|
||||||
|
if (this.server.getConfiguration().isLogPlayerConnections()) {
|
||||||
logger.error("{}: disconnected while connecting to {}: {}", this,
|
logger.error("{}: disconnected while connecting to {}: {}", this,
|
||||||
server.getServerInfo().getName(), plainTextReason);
|
server.getServerInfo().getName(), plainTextReason);
|
||||||
|
}
|
||||||
handleConnectionException(server, disconnectReason,
|
handleConnectionException(server, disconnectReason,
|
||||||
Component.translatable("velocity.error.cant-connect", NamedTextColor.RED,
|
Component.translatable("velocity.error.cant-connect", NamedTextColor.RED,
|
||||||
Component.text(server.getServerInfo().getName()),
|
Component.text(server.getServerInfo().getName()),
|
||||||
|
|||||||
Reference in New Issue
Block a user