package pw.hamzantal.vagueenchants.commands

import pw.hamzantal.vagueenchants.conn
import hazae41.minecraft.kutils.bukkit.msg
import org.bukkit.command.CommandSender

class Connect : Cmd {
	override val firstArg = "connect"
	override val usage = "/ve connect"
	override val minArgs = 1
	override val description = "&7Connect to mysql"

	override val requirePermission = true
	override val permission = "ve.admin"
	override val requirePlayer = false

	override fun execute(sender: CommandSender, args: Array<String>) {
		if (conn != null) {
			sender.msg("&cConnection has been successfully established")
		} else {
			sender.msg("&aThe connection is not established")
		}
	}
}