From 4d24a8c992a2524a17e36699ab5a0916d0c4be0f Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Thu, 4 Feb 2021 13:43:25 -0300 Subject: [PATCH] fix list wrong address --- .../kotlin/com/github/creeper123123321/viaaas/VIAaaS.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/github/creeper123123321/viaaas/VIAaaS.kt b/src/main/kotlin/com/github/creeper123123321/viaaas/VIAaaS.kt index 7107c77..52857ba 100644 --- a/src/main/kotlin/com/github/creeper123123321/viaaas/VIAaaS.kt +++ b/src/main/kotlin/com/github/creeper123123321/viaaas/VIAaaS.kt @@ -184,7 +184,7 @@ class VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender { if (suggestion == null) { sendMessage("List of player connections: ") Via.getPlatform().connectionManager.connections.forEach { - val pAddr = it.channel?.remoteAddress() + val backAddr = it.channel?.remoteAddress() val pVer = it.protocolInfo?.protocolVersion?.let { ProtocolVersion.getProtocol(it) } @@ -192,10 +192,10 @@ class VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender { val backVer = it.protocolInfo?.serverProtocolVersion?.let { ProtocolVersion.getProtocol(it) } - val backAddr = + val pAddr = it.channel?.pipeline()?.get(CloudMinecraftHandler::class.java)?.other?.remoteAddress() val pName = it.channel?.pipeline()?.get(CloudMinecraftHandler::class.java)?.data?.frontName - sendMessage("$pAddr ($pVer) ($pName) -> ($backVer) ($backName) $backAddr") + sendMessage("$pAddr $pVer ($pName) -> $backVer ($backName) $backAddr") } } }