Class PositionChangeEvent

java.lang.Object
us.ajg0702.queue.api.events.PositionChangeEvent
All Implemented Interfaces:
Event

public class PositionChangeEvent extends Object implements Event
Called when someone is added or removed from a queue that the player is in, causing the player's position to change
  • Constructor Details

    • PositionChangeEvent

      public PositionChangeEvent(QueuePlayer player)
  • Method Details

    • getQueuePlayer

      public QueuePlayer getQueuePlayer()
      Gets the QueuePlayer object that represents this player
      Returns:
      the QueuePlayer object
    • getPlayer

      @Nullable public @Nullable AdaptedPlayer getPlayer()
      Gets the AdaptedPlayer that this event is about. May return null!
      Returns:
      The AdaptedPlayer that this event is about. Returns null if the player is offline.
    • getPosition

      public int getPosition()
      Gets the player's new position in the queue
      Returns:
      The player's new position. 1 being 1st, 2 being 2nd, etc
    • getQueue

      public QueueServer getQueue()
      Gets the queue that this event is from
      Returns:
      The QueueServer that the player is in that their position changed