package pw.hamzantal.bloodmoon

import hazae41.minecraft.kutils.bukkit.ConfigFile
import hazae41.minecraft.kutils.get
import org.bukkit.Bukkit
import org.bukkit.ChatColor

object Config : ConfigFile(BloodMoon.pl.dataFolder["config.yml"]) {
    private val _world by string("world", "world")
    val world get() = Bukkit.getWorld(_world)
    val chance by double("chance", 0.2)

    val enabledMobs by stringList("transformed_mobs")
    val zombieSwarm by boolean("zombieSwarm", true)
    val chargedCreepers by boolean("chargedCreepers", true)
    val strongSpiders by boolean("strongSpiders", true)

    val startMessage by string("startMessage", "&c&lThe blood moon has now started".c)
    val endMessage by string("endMessage", "&cThe blood moon is now over".c)
}

val String.c get() = ChatColor.translateAlternateColorCodes('&', this)