TerraOceanPlugin/KotlinPlugin/src/main/kotlin/com/terraocean/plugin/bridge/AFKBridge.kt

11 lines
300 B
Kotlin

package com.terraocean.plugin.bridge
import io.ktor.http.cio.websocket.send
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
fun reportPlayerActivity(username: String, activity: Long) {
MainScope().launch {
webSocketSession.send("active $username $activity")
}
}