Skip to content

EquipmentSlot

enum class EquipmentSlot(val id: Int)
Example
on_login { player ->
val equipment = player.findComponent<Equipment>() ?: return@on_login
val hat = equipment[EquipmentSlot.Head]
player.message(if (hat == null) "You wear no hat." else "You wear ${hat.name}.")
}
val id: Int
Head
Back
Neck
MainHand
Body
OffHand
Arms
Legs
Hair
Hands
Feet
Beard
Finger
Quiver
HairAndBeard
fun fromId(id: Int): EquipmentSlot?