Interface QueuePlayer


public interface QueuePlayer
  • Method Details

    • getUniqueId

      UUID getUniqueId()
      Returns the player's UUID
      Returns:
      the player's UUID
    • getQueueServer

      QueueServer getQueueServer()
      Gets the server or group this player is queued for
      Returns:
      The QueueServer this player is queued for
    • getQueueType

      QueueType getQueueType()
      Gets whether this player is in the standard or express queue
      Returns:
      the queue type (STANDARD or EXPRESS)
    • getPosition

      default int getPosition()
      Gets the player's position in the queue
      Returns:
      The player's position. 1 being 1st, 2 being 2nd, etc
    • getAbsolutePosition

      int getAbsolutePosition()
      Gets the player's absolute position. Absolute because it takes into account express queue and the express queue sending ratio. Basically, this is the real number of people that will be sent to the server before this player (+1).
      Returns:
      The player's absolute position. 1 being 1st, 2 being 2nd, etc.
    • getPlayer

      @Nullable AdaptedPlayer getPlayer()
      Get the player this represents. Can be null because the player could not be online
      Returns:
      The player if they are online, null otherwise
    • setPlayer

      void setPlayer(AdaptedPlayer player)
      Sets the player that this represents. Will throw IllegalArgumentException if the player's uuid does not match the original.
      Parameters:
      player - The player to add
    • getPriority

      int getPriority()
      Gets the highest priority level the player has. In free ajQueue, no priority is 0 and priority is 1
      Returns:
      The priority level of this player for this server
    • hasPriority

      boolean hasPriority()
      Gets if this player has priority
    • getName

      String getName()
      Gets the player's username
      Returns:
      the player's username
    • getTimeSinceOnline

      long getTimeSinceOnline()
      Returns the number of miliseconds since this player was online
      Returns:
      The number of miliseconds since this player was online
    • getMaxOfflineTime

      int getMaxOfflineTime()
      Gets the max number of seconds this player is allowed to be offline before getting removed from the queue.
      Returns:
      the max number of seconds this player can be offline before being removed from the queue
    • getInitialServer

      AdaptedServer getInitialServer()
      Gets the server that the player was in when they joined the queue
      Returns:
      the server that the player was in when they joined the queue
    • getETA

      int getETA()
      Gets an estimate until the player is sent to the server.
      Returns:
      ETA until the player is sent to the server, in seconds.
    • connect

      void connect(@NotNull @NotNull AdaptedServer server)
      Attempts a connection to the provided AdaptedServer, calling PreConnectEvent before AdaptedPlayer.connect(...)
    • isInExpressQueue

      default boolean isInExpressQueue()
    • isInStandardQueue

      default boolean isInStandardQueue()