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.

@FunctionalInterface public static interface ServerPlayerEvents.AllowDeath
  • Method Summary

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

    • allowDeath

      boolean allowDeath(net.minecraft.server.network.ServerPlayerEntity player, net.minecraft.entity.damage.DamageSource damageSource, float damageAmount)
      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.