Class AsyncPlayerRejoinPullArenaEvent

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

public class AsyncPlayerRejoinPullArenaEvent extends Event implements ArenaEvent
Gets called when a player from another server attempts to rejoin an arena on this server.

This event gets called before PlayerRejoinArenaEvent. If this event ends with an issue (or the player fails to get pulled), PlayerRejoinArenaEvent may not be called at all.

This event may be called even without the ProxySync Add-On installed, as the rejoin mechanism utilizes the BungeeCord messaging system.

This event does not get called if the player is located on the server the arena is located at, or if the arena is located on another server.

  • Constructor Details

  • Method Details

    • getPlayerUUID

      public UUID getPlayerUUID()
      Get the uniqueId of the player that attempts to rejoin.
      Returns:
      The Entity.getUniqueId() of the rejoining player
    • getServerChannelName

      public String getServerChannelName()
      Get the bungeecord/proxy name of the server the player is located on.
      Returns:
      The server channel name sending the request
    • hasIssues

      public boolean hasIssues()
      Get whether there is any issue that would prevent the player from rejoining.
      Returns:
      true if the rejoin would fail
      See Also:
    • getIssues

      public Set<RejoinPlayerIssue> getIssues()
      Get the issues that prevent the player from rejoining.
      Returns:
      The issues with his attempt
      See Also:
    • addIssue

      public boolean addIssue(RejoinPlayerIssue issue)
      Adds an issue which causes the player to not be able to rejoin the arena.
      Parameters:
      issue - The issue that shall be added
      Returns:
      false if that issue already existed before
    • removeIssue

      public boolean removeIssue(RejoinPlayerIssue issue)
      Removes an issue.

      If all were removed the player will be able to rejoin the arena.

      Parameters:
      issue - The issue that shall be removed
      Returns:
      true if it has been removed
    • getHandlers

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

      public static HandlerList getHandlerList()