Class QueueHolder
java.lang.Object
us.ajg0702.queue.api.queueholders.QueueHolder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddPlayer(QueuePlayer player) Adds a player to the end of the queue NOTE: Do not manually call this! Use the QueueManager to add players to queuesabstract voidaddPlayer(QueuePlayer player, int position) Adds a player to the specified position in the queue NOTE: Do not manually call this! Use the QueueManager to add players to queuesabstract QueuePlayerfindPlayer(String name) Finds the player with this username in this queue and returns the representative QueuePlayerabstract QueuePlayerfindPlayer(UUID uuid) Finds the player with this uuid in this queue and returns the representative QueuePlayerfindPlayer(AdaptedPlayer player) abstract List<QueuePlayer>Get all players that are in the express queueGets all players that are in all queues for this serverabstract List<QueuePlayer>Get all players that are in the standard queueabstract intReturns the size of the express queueabstract StringReturns the identifier of this QueueHolder Used by the server owner in order to tell ajQueue to use this QueueHolderabstract intgetPosition(QueuePlayer player) abstract intReturns the size of the standard queueabstract intGets the number of players in both express and standard queues combined, but only ones that are onlineabstract intGets the size of both the express and standard queues combinesvoidremovePlayer(UUID uuid) voidremovePlayer(AdaptedPlayer player) abstract voidremovePlayer(QueuePlayer player) Removes a player from the queue
-
Constructor Details
-
QueueHolder
-
-
Method Details
-
getIdentifier
Returns the identifier of this QueueHolder Used by the server owner in order to tell ajQueue to use this QueueHolder- Returns:
- a string that is very unlikely to be re-used by another QueueHolder
-
addPlayer
Adds a player to the end of the queue NOTE: Do not manually call this! Use the QueueManager to add players to queues- Parameters:
player- The QueuePlayer to add
-
addPlayer
Adds a player to the specified position in the queue NOTE: Do not manually call this! Use the QueueManager to add players to queues- Parameters:
player- The QueuePlayer to addposition- The position to add them to
-
removePlayer
-
removePlayer
-
removePlayer
Removes a player from the queue- Parameters:
player- The player to remove
-
findPlayer
Finds the player with this uuid in this queue and returns the representative QueuePlayer- Returns:
- The QueuePlayer representing the player, null if not found
-
findPlayer
Finds the player with this username in this queue and returns the representative QueuePlayer- Returns:
- The QueuePlayer representing the player, null if not found
-
findPlayer
-
getStandardQueueSize
public abstract int getStandardQueueSize()Returns the size of the standard queue- Returns:
- The number of players in the standard queue
-
getExpressQueueSize
public abstract int getExpressQueueSize()Returns the size of the express queue- Returns:
- The number of players in the express queue
-
getTotalQueueSize
public abstract int getTotalQueueSize()Gets the size of both the express and standard queues combines- Returns:
- the number of players in both queues
-
getTotalOnlineQueueSize
public abstract int getTotalOnlineQueueSize()Gets the number of players in both express and standard queues combined, but only ones that are online- Returns:
- The number of online players in both queues.
-
getPosition
-
getAllStandardPlayers
Get all players that are in the standard queue- Returns:
- a list of players in the standard queue
-
getAllExpressPlayers
Get all players that are in the express queue- Returns:
- a list of players in the express queue
-
getAllPlayers
Gets all players that are in all queues for this server- Returns:
- a list of all players. Express queue players are first in the list, then standard queue players.
-