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

ServerLivingEntityEventFabricObject
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

ServerLivingEntityEvent.onLivingHurtFabricProperty
kotlin
@JvmField
@JvmField val onLivingHurt

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

ServerLivingEntityEvent.onAllowDamage

ServerLivingEntityEvent.onAllowDamageFabricProperty
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

ServerLivingEntityEvent.onAfterDamageFabricProperty
kotlin
val onAfterDamage

Event triggered after a living entity takes damage.

ServerLivingEntityEvent.onAllowDeath

ServerLivingEntityEvent.onAllowDeathFabricProperty
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

ServerLivingEntityEvent.onAfterDeathFabricProperty
kotlin
val onAfterDeath

Event triggered after a living entity dies.

ServerLivingEntityEvent.onLivingFall

ServerLivingEntityEvent.onLivingFallFabricProperty
kotlin
@JvmField
@JvmField val onLivingFall

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

ServerLivingEntityEvent.onMobConversion

ServerLivingEntityEvent.onMobConversionFabricProperty
kotlin
val onMobConversion

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