From 75f3e63e4c0e8ad2638722d23e17b21531a33fba Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:26:18 -0500 Subject: [PATCH] feat: add error message when WS connection is dropped --- src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt b/src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt index 140cd8f39..6b75a801b 100644 --- a/src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt +++ b/src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt @@ -18,7 +18,9 @@ package gg.skytils.skytilsws.client +import gg.essential.universal.UChat import gg.skytils.skytilsmod.Skytils +import gg.skytils.skytilsmod.Skytils.Companion.mc import gg.skytils.skytilsws.shared.SkytilsWS import gg.skytils.skytilsws.shared.packet.C2SPacketConnect import gg.skytils.skytilsws.shared.packet.Packet @@ -85,6 +87,7 @@ object WSClient { e.printStackTrace() closeExceptionally(e) } finally { + if (mc.theWorld != null) UChat.chat("${Skytils.failPrefix} §cConnection to SkytilsWS lost") session = null } }