Enum Class NpcDeathEvent.Cause

java.lang.Object
java.lang.Enum<NpcDeathEvent.Cause>
net.risingworld.api.events.npc.NpcDeathEvent.Cause
All Implemented Interfaces:
Serializable, Comparable<NpcDeathEvent.Cause>, Constable
Enclosing class:
NpcDeathEvent

public static enum NpcDeathEvent.Cause extends Enum<NpcDeathEvent.Cause>
Determines why the NpcDeathEvent was triggered exactly (i.e why the npc actually died).
  • Enum Constant Details

    • Unknown

      public static final NpcDeathEvent.Cause Unknown
      Nobody knows why this npc died...
    • KilledByPlayer

      public static final NpcDeathEvent.Cause KilledByPlayer
      Npc was killed by a player
    • KilledByNpc

      public static final NpcDeathEvent.Cause KilledByNpc
      Npc was killed by another npc
    • Drowned

      public static final NpcDeathEvent.Cause Drowned
      Npc drowned
    • Lava

      public static final NpcDeathEvent.Cause Lava
      Npc fell into lava
    • Burned

      public static final NpcDeathEvent.Cause Burned
      Npc burned to death (e.g by touching fire)
    • Explosion

      public static final NpcDeathEvent.Cause Explosion
      Npc was killed by an explosion
    • FallDamage

      public static final NpcDeathEvent.Cause FallDamage
      Npc died due to fall damage
    • Trap

      public static final NpcDeathEvent.Cause Trap
      Npc died in a trap
    • OldAge

      public static final NpcDeathEvent.Cause OldAge
      Npc died of old age (if "age" is greater than the max life time)
    • OutOfRange

      public static final NpcDeathEvent.Cause OutOfRange
      Npc died because no player was in range (only relevant for transient npcs)
    • Daybreak

      public static final NpcDeathEvent.Cause Daybreak
      Npc died because the night is over (only relevant for certain npcs)
  • Method Details

    • values

      public static NpcDeathEvent.Cause[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NpcDeathEvent.Cause valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null