Class TeamEliminateEvent

java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.arena.TeamEliminateEvent
All Implemented Interfaces:
ArenaEvent

public class TeamEliminateEvent extends Event implements 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

  • Constructor Details

    • TeamEliminateEvent

      public TeamEliminateEvent(Arena arena, Team team, Player causingPlayer, Player lastPlayer, boolean causesEnd)
  • Method Details

    • getTeam

      public Team getTeam()
      Returns the team that has been eliminated.
      Returns:
      The team that has been eliminated
    • getCausingPlayer

      @Nullable public @Nullable Player 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

      @Nullable public @Nullable Player getLastPlayer()
      Returns the player that survived as last in the team that has been eliminated

      Is 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()
      Returns true if the game will end after this event.
      Returns:
      Whether the game will end after the event
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()