Interface ServerPlayerEvents.AllowDeath
- Enclosing class:
ServerPlayerEvents
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallowDeath(ServerPlayerEntity player, DamageSource damageSource, float damageAmount) Deprecated.Called when a player takes fatal damage (before totems of undying can take effect).
-
Method Details
-
allowDeath
Deprecated.Called when a player takes fatal damage (before totems of undying can take effect).- Parameters:
player- the playerdamageSource- the fatal damage damageSourcedamageAmount- the damageAmount of damage that has killed the player- Returns:
- true if the death should go ahead, false otherwise.
-
ServerLivingEntityEvents.ALLOW_DEATHevent instead and check forinstanceof ServerPlayerEntity.