KStarbound/src/main/kotlin/ru/dbotthepony/kstarbound/server/IntegratedStarboundServer.kt

19 lines
381 B
Kotlin

package ru.dbotthepony.kstarbound.server
import ru.dbotthepony.kstarbound.client.StarboundClient
import java.io.Closeable
import java.io.File
class IntegratedStarboundServer(val client: StarboundClient, root: File) : StarboundServer(root) {
init {
channels.createLocalChannel()
start()
}
override fun tick0(delta: Double) {
if (client.isShutdown) {
close()
}
}
}