27 lines
744 B
Kotlin
27 lines
744 B
Kotlin
|
package com.terraocean.plugin
|
||
|
|
||
|
import com.terraocean.plugin.bridge.establishConnection
|
||
|
import io.ktor.util.KtorExperimentalAPI
|
||
|
import kotlinx.coroutines.MainScope
|
||
|
import kotlinx.coroutines.coroutineScope
|
||
|
import kotlinx.coroutines.launch
|
||
|
import org.bukkit.plugin.java.JavaPlugin
|
||
|
import java.io.File
|
||
|
|
||
|
internal lateinit var instance: TerraOceanPlugin
|
||
|
|
||
|
class TerraOceanPlugin: JavaPlugin() {
|
||
|
@KtorExperimentalAPI
|
||
|
override fun onEnable() {
|
||
|
instance = this
|
||
|
config.load(File("plugin/terraocean.yml"))
|
||
|
MainScope().launch {
|
||
|
establishConnection()
|
||
|
}
|
||
|
logger.info("TerraOcean plugin has started.")
|
||
|
}
|
||
|
override fun onDisable() {
|
||
|
logger.info("TerraOcean plugin has stopped.")
|
||
|
}
|
||
|
}
|