Class PlayerQuitArenaEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerQuitArenaEvent
All Implemented Interfaces:
ArenaEvent

public class PlayerQuitArenaEvent extends PlayerEvent implements ArenaEvent
Gets called when a player leaves an arena
  • Constructor Details

    • PlayerQuitArenaEvent

      public PlayerQuitArenaEvent(Player player, Arena arena, KickReason reason, @Nullable @Nullable Team team, @Nullable @Nullable QuitPlayerMemory memory, boolean hasLeaveMessage)
  • Method Details

    • hasLeaveMessage

      public boolean hasLeaveMessage()
      Returns whether a leave message should be sent for all players in the arena.
      Returns:
      true if a leave message should be sent, false otherwise
    • setHasLeaveMessage

      public void setHasLeaveMessage(boolean hasLeaveMessage)
      Sets whether a leave message should be sent for all players in the arena.
      Parameters:
      hasLeaveMessage - true if a leave message should be sent, false otherwise
    • getReason

      public KickReason getReason()
      Returns the reason why he left the arena.
      Returns:
      The reason
    • getTeam

      @Nullable public @Nullable Team getTeam()
      Returns the team in which he was before he left the arena.

      Might be null when they didn't join any as it's possible during the lobby phase.

      Returns:
      The arena in which he played in
    • getMemory

      @Nullable public @Nullable QuitPlayerMemory getMemory()
      Returns the memory of his past ingame state.

      It might be null if the match hasn't started yet or it has already ended past the endlobby state.

      Returns:
      The memory of the player. Might be null
    • getHandlers

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

      public static HandlerList getHandlerList()