Enum Class PlayerDeathEvent.Cause
- All Implemented Interfaces:
Serializable
,Comparable<PlayerDeathEvent.Cause>
,Constable
- Enclosing class:
PlayerDeathEvent
Determines why the
PlayerDeathEvent
was triggered exactly
(i.e what killed this player).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPlayer bleeded outPlayer came in contact with lava or firePlayer died of dehydrationPlayer drownedPlayer fell to his deathPlayer was killed by an explosionAn npc killed this player.Another player killed this player.Player was killed by a trap (e.g spikes)An npc shot down this player.Another player shot down this player.Player died of starvationPlayer froze to deathUnknown reason... -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerDeathEvent.Cause
Returns the enum constant of this class with the specified name.static PlayerDeathEvent.Cause[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Unknown
Unknown reason... -
KilledByPlayer
Another player killed this player. In this case,PlayerDeathEvent.getKiller()
returns the player -
ShotByPlayer
Another player shot down this player. In this case,PlayerDeathEvent.getKiller()
returns the player -
KilledByNpc
An npc killed this player. In this case,PlayerDeathEvent.getKiller()
returns the npc -
ShotByNpc
An npc shot down this player. In this case,PlayerDeathEvent.getKiller()
returns the npc -
Drowned
Player drowned -
Burned
Player came in contact with lava or fire -
KilledByExplosion
Player was killed by an explosion -
FallDamage
Player fell to his death -
BleededToDeath
Player bleeded out -
Starved
Player died of starvation -
Dehydrated
Player died of dehydration -
Temperature
Player froze to death -
KilledByTrap
Player was killed by a trap (e.g spikes)
-
-
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
-