File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/main/kotlin/io/github/arkosammy12/compsmpdiscordbot Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import io.github.arkosammy12.monkeyconfig.managers.getRawNumberSettingValue
9
9
import io.github.arkosammy12.monkeyconfig.managers.getRawStringSettingValue
10
10
import io.github.arkosammy12.monkeyutils.registrars.DefaultConfigRegistrar
11
11
import kotlinx.coroutines.Job
12
+ import kotlinx.coroutines.cancelAndJoin
12
13
import kotlinx.coroutines.runBlocking
13
14
import net.fabricmc.api.DedicatedServerModInitializer
14
15
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents
@@ -75,6 +76,7 @@ object CompSMPDiscordBot : DedicatedServerModInitializer {
75
76
private fun onServerStopping (server : MinecraftServer ) {
76
77
runBlocking {
77
78
bot.close()
79
+ botJob.cancelAndJoin()
78
80
}
79
81
80
82
}
You can’t perform that action at this time.
0 commit comments