Skip to content

Commit

Permalink
feat: add error message when WS connection is dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
My-Name-Is-Jeff committed Dec 12, 2024
1 parent 501aa94 commit 75f3e63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/gg/skytils/skytilsws/client/WSClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 75f3e63

Please sign in to comment.