VoidPlugin/VoidTeleport/src/main/kotlin/nl/voidcorp/teleportplugin/VoidTeleport.kt

26 lines
974 B
Kotlin

package nl.voidcorp.teleportplugin
import nl.voidcorp.mainplugin.CommandHandler
import nl.voidcorp.mainplugin.VoidPluginBase
import nl.voidcorp.teleportplugin.commands.*
import nl.voidcorp.teleportplugin.models.Homes
import nl.voidcorp.teleportplugin.models.Warps
import org.jetbrains.exposed.sql.SchemaUtils
import org.jetbrains.exposed.sql.transactions.transaction
class VoidTeleport(override val comment: String = "Teleport around :D") :
VoidPluginBase() {
override fun enable() {
CommandHandler(this)
.registerCommand("sethome", SetHomeCommand())
.registerCommand("home", HomeCommand())
.registerCommand("delhome", DelHomeCommand())
.registerCommand("warp", WarpCommand())
.registerCommand("spawn",SpawnCommand())
.registerCommand("setworldspawn", SetWorldspawnCommand())
transaction {
SchemaUtils.createMissingTablesAndColumns(Homes, Warps)
}
}
}