Package com.btcvelocity.api.queue
Interface QueueEntry
public interface QueueEntry
Represents a player that is currently in a
Queue.-
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of connection attempts made for this player so far.intReturns the 1-based position of this entry in its owning queue.intReturns the priority of this player in the queue.getQueue()Returns theQueuethat this entry belongs to.Returns the unique identifier of the player.Returns the username of the player.booleanReturnstrueif this player has the full-server bypass permission, allowing them to be transferred even when the backend server is full.booleanReturnstrueif this player has the queue-bypass permission, allowing them to connect directly without being queued.booleanReturnstrueif the player is currently in the process of being transferred to the backend server.
-
Method Details
-
getUniqueId
UUID getUniqueId()Returns the unique identifier of the player.- Returns:
- the player's UUID
-
getUsername
String getUsername()Returns the username of the player.- Returns:
- the player's username
-
getPriority
int getPriority()Returns the priority of this player in the queue. Higher values mean higher priority, i.e., the player is closer to the front of the queue.- Returns:
- the queue priority
-
getConnectionAttempts
int getConnectionAttempts()Returns the number of connection attempts made for this player so far.- Returns:
- the connection attempt count
-
isWaitingForConnection
boolean isWaitingForConnection()Returnstrueif the player is currently in the process of being transferred to the backend server.- Returns:
trueif a transfer is in progress
-
isFullBypass
boolean isFullBypass()Returnstrueif this player has the full-server bypass permission, allowing them to be transferred even when the backend server is full.- Returns:
trueif the player can bypass the full-server limit
-
isQueueBypass
boolean isQueueBypass()Returnstrueif this player has the queue-bypass permission, allowing them to connect directly without being queued.- Returns:
trueif the player can bypass the queue
-
getPosition
int getPosition()Returns the 1-based position of this entry in its owning queue.This value is kept up to date by the queue whenever entries are added or removed.
- Returns:
- the current queue position, where 1 is at the front
-
getQueue
Queue getQueue()Returns theQueuethat this entry belongs to.- Returns:
- the owning queue
-