Class EntityDeathEvent

java.lang.Object
fr.fidorial.event.entity.EntityDeathEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
PlayerDeathEvent

public class EntityDeathEvent extends Object implements Event
Fired when an entity dies, once its health reached zero and before it is removed from the world.
Since:
0.1.0
See Also:
  • Constructor Details

    • EntityDeathEvent

      public EntityDeathEvent(Entity entity, @Nullable Entity killer)
      Creates an event.
      Parameters:
      entity - the entity that died
      killer - the entity credited with the kill, or null for environmental deaths
      Since:
      0.1.0
  • Method Details

    • killer

      public @Nullable Entity killer()
      Returns:
      the entity credited with the kill, or null for environmental deaths
    • entity

      public Entity entity()
      Returns:
      the entity that died