Interface QueueAPI
public interface QueueAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoidattempt(@NotNull org.bukkit.entity.Player player) Attempts to match two players in the queue.@NotNull @UnmodifiableView Map<UUID, QueueEntry> getQueue()Retrieves the current state of the queue, which contains all queued players and their respective kit entries.booleanisInQueue(@NotNull org.bukkit.entity.Player player) Checks if a player is currently in the queue.voidAdds a player to the queue for a specific kit.voidremove(@NotNull org.bukkit.entity.Player player) Removes a player from the queue.
-
Method Details
-
queue
Adds a player to the queue for a specific kit.- Parameters:
player- The player to be added to the queue.kit- The kit that the player is queuing for.
-
attempt
void attempt(@NotNull @NotNull org.bukkit.entity.Player player) Attempts to match two players in the queue. This will match players who are waiting in the queue and ready to duel.- Parameters:
player- The player attempting to be matched.
-
remove
void remove(@NotNull @NotNull org.bukkit.entity.Player player) Removes a player from the queue.- Parameters:
player- The player to be removed from the queue.
-
isInQueue
boolean isInQueue(@NotNull @NotNull org.bukkit.entity.Player player) Checks if a player is currently in the queue.- Parameters:
player- The player to check.- Returns:
trueif the player is in the queue,falseotherwise.
-
getQueue
Retrieves the current state of the queue, which contains all queued players and their respective kit entries.- Returns:
- A map of UUIDs to QueueEntries, where each entry represents a player in the queue and their kit.
-