Skip to content
On this page

Fabric

ServerLivingEntityEvent

top.katton.api.eventfabric/src/main/kotlin/top/katton/api/event/ServerLivingEntityEvent.kt
Server-side living entity events for Fabric platform.

ServerLivingEntityEvent

FabricObject
kotlin
@Suppress("unused")
object ServerLivingEntityEvent

Server-side living entity events for Fabric platform.

This object provides events related to living entity lifecycle including damage, death, and mob conversion events.

ServerLivingEntityEvent.onLivingHurt

FabricProperty
kotlin
@JvmField
@JvmField val onLivingHurt

Event triggered when a living entity is hurt. Can be cancelled to prevent the damage.

ServerLivingEntityEvent.onAllowDamage

FabricProperty
kotlin
val onAllowDamage

Event triggered to allow or deny damage to a living entity.

Returns

true to allow the damage, false to cancel it.

ServerLivingEntityEvent.onAfterDamage

FabricProperty
kotlin
val onAfterDamage

Event triggered after a living entity takes damage.

ServerLivingEntityEvent.onAllowDeath

FabricProperty
kotlin
val onAllowDeath

Event triggered to allow or deny death of a living entity.

Returns

true to allow the death, false to cancel it.

ServerLivingEntityEvent.onAfterDeath

FabricProperty
kotlin
val onAfterDeath

Event triggered after a living entity dies.

ServerLivingEntityEvent.onLivingFall

FabricProperty
kotlin
@JvmField
@JvmField val onLivingFall

Event triggered when a living entity falls. Can be cancelled to prevent fall damage processing.

ServerLivingEntityEvent.onMobConversion

FabricProperty
kotlin
val onMobConversion

Event triggered when a mob is converted to another type (e.g., zombie villager curing, piglin zombification).