Package us.ajg0702.queue.api.spigot
Class AjQueueSpigotAPI
java.lang.Object
us.ajg0702.queue.api.spigot.AjQueueSpigotAPI
An API that is usable from the spigot-side
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToQueue(UUID player, String queueName) Adds a player to a queue (bypassing any permission checks that would prevent it)abstract Future<MessagedResponse<String>>getEstimatedTime(UUID player) Gets the estimated time until the player is sent to the serverstatic AjQueueSpigotAPIGets the instance of the ajQueue spigot APIgetPlayersInQueue(String queueName) Gets the number of players in a specific queueabstract Future<MessagedResponse<Integer>>getPosition(UUID player) Gets the position of the player in their queueabstract Future<MessagedResponse<String>>getQueueName(UUID player) Gets the name of the queue that the player is inabstract Future<MessagedResponse<String>>getRawQueueName(UUID player) Gets the raw name of the queue that the player is in (doesn't use server aliases)getServerStatusString(String queueName) Gets the status string for the queue specified (e.g.getServerStatusString(String queueName, UUID player) Gets the status string for the queue specified (e.g.abstract Future<MessagedResponse<Integer>>getTotalPositions(UUID player) Gets the total number of players who are in queue with the playerabstract voidEmulate the player running the queue command for a certain server, including any permission checks
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
AjQueueSpigotAPI
public AjQueueSpigotAPI()
-
-
Method Details
-
getInstance
Gets the instance of the ajQueue spigot API- Returns:
- the ajQueue API
-
isInQueue
-
addToQueue
Adds a player to a queue (bypassing any permission checks that would prevent it)- Parameters:
player- The player to be addedqueueName- The server or group to add the player to- Returns:
- True if adding was successful, false if not.
-
sudoQueue
Emulate the player running the queue command for a certain server, including any permission checks- Parameters:
player- The player to sudo the command forqueueName- The queue to send the player to
-
getQueueName
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
-
getRawQueueName
Gets the raw name of the queue that the player is in (doesn't use server aliases)- Parameters:
player- the player- Returns:
- the name of the queue that the player is in
-
getPosition
Gets the position of the player in their queue- Parameters:
player- The player- Returns:
- The position of the player in their queue
-
getTotalPositions
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
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
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
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 queueplayer- the player to check with- Returns:
- The status string for the queue you specified.
-
getEstimatedTime
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
-