com.skillw.pouvoir.api.feature.realizer.component.Switchable.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
package com.skillw.pouvoir.api.feature.realizer.component
import com.skillw.pouvoir.api.feature.realizer.BaseRealizer
import taboolib.common5.cbool
/**
* @className Realizable
*
* @author Glom
* @date 2023/1/5 16:25 Copyright 2022 user.
*/
interface Switchable {
val defaultEnable: Boolean
fun isEnable(): Boolean = (this as? BaseRealizer)?.config?.get("enable")?.cbool ?: defaultEnable
fun isDisable(): Boolean = !isEnable()
fun whenEnable() {}
fun whenDisable() {}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy