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 Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum 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 Summary
Modifier and TypeMethodDescriptionstatic NpcDeathEvent.Cause
Returns 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
-
Unknown
Nobody knows why this npc died... -
KilledByPlayer
Npc was killed by a player -
KilledByNpc
Npc was killed by another npc -
Drowned
Npc drowned -
Lava
Npc fell into lava -
Burned
Npc burned to death (e.g by touching fire) -
Explosion
Npc was killed by an explosion -
FallDamage
Npc died due to fall damage -
Trap
Npc died in a trap -
OldAge
Npc died of old age (if "age" is greater than the max life time) -
OutOfRange
Npc died because no player was in range (only relevant for transient npcs) -
Daybreak
Npc died because the night is over (only relevant for certain npcs)
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-