Class TeamEliminateEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.arena.TeamEliminateEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when all players of a team have been eliminated.
This event only get once per team and only in the following cases:
- The bed has been broken and all players have been excluded from the match
- In solo (1 player per team) matches: Player has left the team (with his bed being alive) and missed the rejoin period
- Bed has been destroyed with no players remaining in that team
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionTeamEliminateEvent
(Arena arena, Team team, Player causingPlayer, Player lastPlayer, boolean causesEnd) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the game will end after this event.@Nullable Player
Returns the player that is responsible for this event.static HandlerList
@Nullable Player
Returns the player that survived as last in the team that has been eliminatedgetTeam()
Returns the team that has been eliminated.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.marcely.bedwars.api.event.arena.ArenaEvent
getArena
-
Constructor Details
-
TeamEliminateEvent
-
-
Method Details
-
getTeam
Returns the team that has been eliminated.- Returns:
- The team that has been eliminated
-
getCausingPlayer
Returns the player that is responsible for this event.May be
null
if nobody is responsible, as e.g. all players have left the match.Responsible player may i.a. be:
- The one who killed the last alive player of the team
- The one who broke the bed of the team- Returns:
- The player who caused the team to get eliminated. May be
null
-
getLastPlayer
Returns the player that survived as last in the team that has been eliminatedIs null in case the player is not known, e.g. if the bed is being broken with no player of that team being online.
- Returns:
- The player that died as last. May be
null
-
causesEnd
public boolean causesEnd()Returnstrue
if the game will end after this event.- Returns:
- Whether the game will end after the event
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-