Package net.risingworld.api.events.npc
Enum Class NpcDeathEvent.Cause
- All Implemented Interfaces:
- Serializable,- Comparable<NpcDeathEvent.Cause>,- Constable
- Enclosing class:
- NpcDeathEvent
Determines why the 
NpcDeathEvent was triggered exactly
 (i.e why the npc actually died).- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionNpc burned to death (e.g by touching fire)Npc died because the night is over (only relevant for certain npcs)Npc drownedNpc was killed by an explosionNpc died due to fall damageNpc was killed by another npcNpc was killed by a playerNpc fell into lavaNpc died of old age (if "age" is greater than the max life time)Npc died because no player was in range (only relevant for transient npcs)Npc died in a trapNobody knows why this npc died...
- 
Method SummaryModifier and TypeMethodDescriptionstatic NpcDeathEvent.CauseReturns the enum constant of this class with the specified name.static NpcDeathEvent.Cause[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
UnknownNobody knows why this npc died...
- 
KilledByPlayerNpc was killed by a player
- 
KilledByNpcNpc was killed by another npc
- 
DrownedNpc drowned
- 
LavaNpc fell into lava
- 
BurnedNpc burned to death (e.g by touching fire)
- 
ExplosionNpc was killed by an explosion
- 
FallDamageNpc died due to fall damage
- 
TrapNpc died in a trap
- 
OldAgeNpc died of old age (if "age" is greater than the max life time)
- 
OutOfRangeNpc died because no player was in range (only relevant for transient npcs)
- 
DaybreakNpc died because the night is over (only relevant for certain npcs)
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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
 
 
-