Interface QueueAPI


public interface QueueAPI
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    attempt(@NotNull org.bukkit.entity.Player player)
    Attempts to match two players in the queue.
    @NotNull @UnmodifiableView Map<UUID,QueueEntry>
    Retrieves the current state of the queue, which contains all queued players and their respective kit entries.
    boolean
    isInQueue(@NotNull org.bukkit.entity.Player player)
    Checks if a player is currently in the queue.
    void
    queue(@NotNull org.bukkit.entity.Player player, String kit)
    Adds a player to the queue for a specific kit.
    void
    remove(@NotNull org.bukkit.entity.Player player)
    Removes a player from the queue.
  • Method Details

    • queue

      void queue(@NotNull @NotNull org.bukkit.entity.Player player, String kit)
      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:
      true if the player is in the queue, false otherwise.
    • getQueue

      @NotNull @NotNull @UnmodifiableView Map<UUID,QueueEntry> 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.