We don't receive cancelled events
This commit is contained in:
parent
3d435200bc
commit
865d74ed2e
@ -776,10 +776,6 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun onHurtEvent(event: LivingHurtEvent) {
|
fun onHurtEvent(event: LivingHurtEvent) {
|
||||||
if (event.isCanceled) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
event.entity.getCapability(MatteryCapability.MATTERY_PLAYER).ifPresentK { it.onHurt(event) }
|
event.entity.getCapability(MatteryCapability.MATTERY_PLAYER).ifPresentK { it.onHurt(event) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user