Class PlayerDeathEvent
java.lang.Object
com.welcome234.pluginsystem.events.PlayerDeathEvent
Called when a player dies
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn enum used for player death causes -
Constructor Summary
ConstructorsConstructorDescriptionPlayerDeathEvent(String playername, PlayerDeathEvent.DeathCause cause, int entityKiller, String playerKiller) -
Method Summary
Modifier and TypeMethodDescriptionGets the cause of the deathGets the entity who killed this player, or null if the death was not caused by an entityGets the player who killed this player, or null if the death was not caused by a playerGets the player that has died
-
Constructor Details
-
PlayerDeathEvent
public PlayerDeathEvent(String playername, PlayerDeathEvent.DeathCause cause, int entityKiller, String playerKiller)
-
-
Method Details
-
getPlayer
Gets the player that has died- Returns:
- Player instance
-
getDeathCause
Gets the cause of the death- Returns:
- Death cause
-
getKillerEntity
Gets the entity who killed this player, or null if the death was not caused by an entity- Returns:
- Player instance
-
getKillerPlayer
Gets the player who killed this player, or null if the death was not caused by a player- Returns:
- Player instance
-