Class EntityDamage

java.lang.Object
net.minestom.server.entity.damage.Damage
net.minestom.server.entity.damage.EntityDamage
All Implemented Interfaces:
Taggable, TagReadable, TagWritable

public class EntityDamage extends Damage
Represents damage inflicted by an Entity.
  • Constructor Details

    • EntityDamage

      public EntityDamage(@NotNull @NotNull Entity source, float amount)
  • Method Details

    • getSource

      @NotNull public @NotNull Entity getSource()
      Gets the source of the damage.
      Overrides:
      getSource in class Damage
      Returns:
      the source
    • getAttacker

      @NotNull public @NotNull Entity getAttacker()
      Description copied from class: Damage
      Gets the "attacker" of the damage. This is the indirect cause of the damage, like the shooter of a projectile, or null if there was none.
      Overrides:
      getAttacker in class Damage
      Returns:
      the attacker