Package me.noahvdaa.uqueue.api.util
Interface QueueablePlayer
public interface QueueablePlayer
A player, that can queue for servers.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the amount of times this player has tried to connect to the server they're queued for or null if they aren't queued.net.md_5.bungee.api.connection.ProxiedPlayer
Returns the ProxiedPlayer this QueueablePlayer belongs to.Returns the QueueableServer the player is queued for, or null if they aren't queued.isQueued()
Returns true if a player is queued for any server.void
setConnectionAttempts(int newConnectionAttempts)
Sets the amount of times the player has tried to connect to the server they're queued for.void
setQueuedServer(QueueableServer server)
Sets the server the player is currently queued for.
-
Method Details
-
isQueued
Boolean isQueued()Returns true if a player is queued for any server.- Returns:
- Whether or not the player is queued.
-
getQueuedServer
QueueableServer getQueuedServer()Returns the QueueableServer the player is queued for, or null if they aren't queued.- Returns:
- The QueueServer the player belongs to or null.
-
getPlayer
net.md_5.bungee.api.connection.ProxiedPlayer getPlayer()Returns the ProxiedPlayer this QueueablePlayer belongs to.- Returns:
- The parent ProxiedPlayer.
-
getConnectionAttempts
Integer getConnectionAttempts()Returns the amount of times this player has tried to connect to the server they're queued for or null if they aren't queued.- Returns:
- The amount of times this player has tried to connect to the target server.
-
setQueuedServer
Sets the server the player is currently queued for. Pass null to mark as not queued.- Parameters:
server
- The server to mark as queued.
-
setConnectionAttempts
void setConnectionAttempts(int newConnectionAttempts)Sets the amount of times the player has tried to connect to the server they're queued for.- Parameters:
newConnectionAttempts
- The new value for connection attempts.
-