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 @FunctionalInterface public static interface ServerPlayerEvents.AllowDeath
Deprecated.
Use the more general ServerLivingEntityEvents.ALLOW_DEATH event instead and check for instanceof ServerPlayerEntity.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    allowDeath(ServerPlayerEntity player, DamageSource damageSource, float damageAmount)
    Deprecated.
    Called when a player takes fatal damage (before totems of undying can take effect).
  • Method Details

    • allowDeath

      boolean allowDeath(ServerPlayerEntity player, DamageSource damageSource, float damageAmount)
      Deprecated.
      Called when a player takes fatal damage (before totems of undying can take effect).
      Parameters:
      player - the player
      damageSource - the fatal damage damageSource
      damageAmount - the damageAmount of damage that has killed the player
      Returns:
      true if the death should go ahead, false otherwise.