Skip to content

StatSlots

object StatSlots
Example
on_login { player ->
for (skill in player.allComponents().filterIsInstance<Skill>()) {
val slot = StatSlots.slotOf(skill.javaClass) ?: continue
Logger.info("${skill.name} is shown in stat slot $slot")
}
}
const val COUNT: Int = 24
val bound: Map<Class<out Skill>, Int>
fun bind(
skill: Class<out Skill>,
slot: Int
)
inline fun <reified T : Skill> bind(slot: Int): Unit
fun unbind(skill: Class<out Skill>): Boolean
fun slotOf(skill: Class<out Skill>): Int?
fun skillAt(slot: Int): Class<out Skill>?