Interface QueueManager


public interface QueueManager
  • Method Details

    • addToQueue

      boolean addToQueue(AdaptedPlayer player, QueueServer server)
      Adds a player to a queue
      Parameters:
      player - The player to be added
      server - The server or group to add the player to
      Returns:
      True if adding was successful, false if not.
    • addToQueue

      boolean addToQueue(AdaptedPlayer player, String serverName)
      Adds a player to a queue
      Parameters:
      player - The player to be added
      serverName - The name of the server or group to add the player too
      Returns:
      True if adding was successful, false if not.
    • canSendInstantly

      boolean canSendInstantly(AdaptedPlayer player, QueueServer queueServer)
      Checks if a player would be sent instantly if they were to join the queue right now
      Parameters:
      player - the player to check
      queueServer - The QueueServer to check for
      Returns:
      if the player would be sent instantly if they join the queue now
    • canSendInstantly

      boolean canSendInstantly(AdaptedPlayer player, QueueServer queueServer, boolean hasBypass)
    • getServers

      com.google.common.collect.ImmutableList<QueueServer> getServers()
      Gets a list of QueueServers (servers and groups)
      Returns:
      A list of QueueServers
    • getServerNames

      com.google.common.collect.ImmutableList<String> getServerNames()
      Gets a list of QueueServer (servers and groups) names
      Returns:
      A list of QueueServer names
    • getSingleServer

      QueueServer getSingleServer(AdaptedPlayer player)
      Get a single server the player is queued for. Depends on the multi-server-queue-pick option in the config
      Parameters:
      player - The player
      Returns:
      The server that was chosen that the player is queued for.
    • getSingleQueuePlayer

      QueuePlayer getSingleQueuePlayer(AdaptedPlayer player)
    • getQueuedName

      String getQueuedName(AdaptedPlayer player)
      Get the name of the server the player is queued for. If multiple servers are queued for, it will use the multi-server-queue-pick option in the config
      Parameters:
      player - The player
      Returns:
      The name of the server, the placeholder none message if not queued
    • reloadServers

      void reloadServers()
      Checks servers that are in the proxy and adds any it doesn't know about. (and removes any that no longer exist) Also creates/edits server groups
    • sendActionBars

      void sendActionBars()
      Sends queue status action bars to players in queues
    • sendTitles

      void sendTitles()
      Sends queue status titles to players in queues
    • sendQueueEvents

      void sendQueueEvents()
      Tell the spigot sides to call the queue scoreboard event
    • sendMessages

      void sendMessages()
      Sends chat queue status messages to players in queues
    • sendMessage

      void sendMessage(QueuePlayer queuePlayer)
      Send a chat queue status message to a specific player in a specific queue
      Parameters:
      queuePlayer - The player that is in the queue
    • updateServers

      void updateServers()
      Updates info about the servers
    • findServer

      QueueServer findServer(String name)
      Find a server by its name
      Parameters:
      name - The name to look for
      Returns:
      The QueueServer if found, null if not
    • sendPlayers

      void sendPlayers()
      Attempts to send the first player in all queues to the server they are queued for
    • sendPlayers

      void sendPlayers(QueueServer server)
      Attempts to send the first player in a specific queue
      Parameters:
      server - The queue that we should try to send.
    • findPlayerInQueues

      com.google.common.collect.ImmutableList<QueuePlayer> findPlayerInQueues(AdaptedPlayer p)
      Finds QueuePlayers that represent this player
      Parameters:
      p - The player to look up
      Returns:
      A list of QueuePlayers that represent this player
    • findPlayerInQueuesByName

      com.google.common.collect.ImmutableList<QueuePlayer> findPlayerInQueuesByName(String name)
      Finds QueuePlayers that have this username
      Parameters:
      name - The username to look up
      Returns:
      A list of QueuePlayers that have this username
    • getPlayerQueues

      com.google.common.collect.ImmutableList<QueueServer> getPlayerQueues(AdaptedPlayer p)
      Gets all of the queues the player is currently queued for
      Parameters:
      p - The player
      Returns:
      A list of QueueServers that this player is queued for
    • clear

      void clear(AdaptedPlayer player)
    • getSendingAttempts

      Map<QueuePlayer,Integer> getSendingAttempts()