From b935337fcfb1ff5bb835b94b501c919da961cad8 Mon Sep 17 00:00:00 2001 From: q13x Date: Sat, 24 Dec 2022 12:18:29 -0800 Subject: [PATCH] Log kick message --- utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.ts b/utils.ts index ce26bfb..09868a9 100644 --- a/utils.ts +++ b/utils.ts @@ -124,6 +124,9 @@ export function loginServer(ip: string, port: number, client: ProxiedPlayer) { mcClient.on('end', () => { client.ws.close() }) + mcClient.on('kick_disconnect', kick => { + logger.warn(`Player ${client.username} was kicked from the server! Reason: ${kick.reason}`) + }) logger.info(`Player ${client.username} has been connected to the server.`) res() })