Class AjQueueSpigotAPI


  • public abstract class AjQueueSpigotAPI
    extends java.lang.Object
    An API that is usable from the spigot-side
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.util.concurrent.Future<java.lang.Boolean> addToQueue​(java.util.UUID player, java.lang.String queueName)
      Adds a player to a queue (bypassing any permission checks that would prevent it)
      abstract java.util.concurrent.Future<MessagedResponse<java.lang.String>> getEstimatedTime​(java.util.UUID player)
      Gets the estimated time until the player is sent to the server
      static AjQueueSpigotAPI getInstance()
      Gets the instance of the ajQueue spigot API
      abstract java.util.concurrent.Future<java.lang.Integer> getPlayersInQueue​(java.lang.String queueName)
      Gets the number of players in a specific queue
      abstract java.util.concurrent.Future<MessagedResponse<java.lang.Integer>> getPosition​(java.util.UUID player)
      Gets the position of the player in their queue
      abstract java.util.concurrent.Future<MessagedResponse<java.lang.String>> getQueueName​(java.util.UUID player)
      Gets the name of the queue that the player is in
      abstract java.util.concurrent.Future<java.lang.String> getServerStatusString​(java.lang.String queueName)
      Gets the status string for the queue specified (e.g.
      abstract java.util.concurrent.Future<java.lang.String> getServerStatusString​(java.lang.String queueName, java.util.UUID player)
      Gets the status string for the queue specified (e.g.
      abstract java.util.concurrent.Future<MessagedResponse<java.lang.Integer>> getTotalPositions​(java.util.UUID player)
      Gets the total number of players who are in queue with the player
      abstract java.util.concurrent.Future<java.lang.Boolean> isInQueue​(java.util.UUID player)  
      abstract void sudoQueue​(java.util.UUID player, java.lang.String queueName)
      Emulate the player running the queue command for a certain server, including any permission checks
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AjQueueSpigotAPI

        public AjQueueSpigotAPI()
    • Method Detail

      • getInstance

        public static AjQueueSpigotAPI getInstance()
        Gets the instance of the ajQueue spigot API
        Returns:
        the ajQueue API
      • isInQueue

        public abstract java.util.concurrent.Future<java.lang.Boolean> isInQueue​(java.util.UUID player)
      • addToQueue

        public abstract java.util.concurrent.Future<java.lang.Boolean> addToQueue​(java.util.UUID player,
                                                                                  java.lang.String queueName)
        Adds a player to a queue (bypassing any permission checks that would prevent it)
        Parameters:
        player - The player to be added
        queueName - The server or group to add the player to
        Returns:
        True if adding was successful, false if not.
      • sudoQueue

        public abstract void sudoQueue​(java.util.UUID player,
                                       java.lang.String queueName)
        Emulate the player running the queue command for a certain server, including any permission checks
        Parameters:
        player - The player to sudo the command for
        queueName - The queue to send the player to
      • getQueueName

        public abstract java.util.concurrent.Future<MessagedResponse<java.lang.String>> getQueueName​(java.util.UUID player)
        Gets the name of the queue that the player is in
        Parameters:
        player - the player
        Returns:
        the name of the queue that the player is in
      • getPosition

        public abstract java.util.concurrent.Future<MessagedResponse<java.lang.Integer>> getPosition​(java.util.UUID player)
        Gets the position of the player in their queue
        Parameters:
        player - The player
        Returns:
        The position of the player in their queue
      • getTotalPositions

        public abstract java.util.concurrent.Future<MessagedResponse<java.lang.Integer>> getTotalPositions​(java.util.UUID player)
        Gets the total number of players who are in queue with the player
        Parameters:
        player - The player
        Returns:
        The number of player in the queue that the player is in.
      • getPlayersInQueue

        public abstract java.util.concurrent.Future<java.lang.Integer> getPlayersInQueue​(java.lang.String queueName)
        Gets the number of players in a specific queue
        Parameters:
        queueName - The name of the queue
        Returns:
        The number of players in that queue.
      • getServerStatusString

        public abstract java.util.concurrent.Future<java.lang.String> getServerStatusString​(java.lang.String queueName)
        Gets the status string for the queue specified (e.g. full, restarting, etc) This is the display status, which is meant to be shown to players (and is pulled from the messages file)
        Parameters:
        queueName - the name of the queue
        Returns:
        The status string for the queue you specified.
      • getServerStatusString

        public abstract java.util.concurrent.Future<java.lang.String> getServerStatusString​(java.lang.String queueName,
                                                                                            java.util.UUID player)
        Gets the status string for the queue specified (e.g. full, restarting, etc) This is the display status, which is meant to be shown to players (and is pulled from the messages file)
        Parameters:
        queueName - the name of the queue
        player - the player to check with
        Returns:
        The status string for the queue you specified.
      • getEstimatedTime

        public abstract java.util.concurrent.Future<MessagedResponse<java.lang.String>> getEstimatedTime​(java.util.UUID player)
        Gets the estimated time until the player is sent to the server
        Parameters:
        player - The player to get
        Returns:
        The estimated time until the player is sent to the server