Class PlayerEliminatedEvent
java.lang.Object
org.bukkit.event.Event
fr.revived.morpheus.game.api.event.GameEvent
fr.revived.morpheus.game.api.event.MatchEvent
fr.revived.morpheus.game.api.event.PlayerEliminatedEvent
Called when a player is eliminated from a match.
Elimination can have multiple causes (kill by another player, void,
environment, etc.).
After this event fires, the
PlayerManager
should convert the victim to a
GameSpectator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe cause of a player elimination.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPlayerEliminatedEvent(Match match, GamePlayer victim, GamePlayer killer, PlayerEliminatedEvent.EliminationCause cause) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()static org.bukkit.event.HandlerListorg.bukkit.event.HandlerListbooleanMethods inherited from class fr.revived.morpheus.game.api.event.MatchEvent
getMatchMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerEliminatedEvent
public PlayerEliminatedEvent(Match match, GamePlayer victim, GamePlayer killer, PlayerEliminatedEvent.EliminationCause cause)
-
-
Method Details
-
getVictim
- Returns:
- the player who was eliminated.
-
getKiller
- Returns:
- the player who dealt the final blow, or
nullif environmental.
-
getCause
- Returns:
- the cause of this elimination.
-
isKilledByPlayer
public boolean isKilledByPlayer()- Returns:
trueif this was a PvP kill.
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Overrides:
getHandlersin classMatchEvent
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-