Package us.ajg0702.queue.api.events
Class PositionChangeEvent
- java.lang.Object
-
- us.ajg0702.queue.api.events.PositionChangeEvent
-
-
Constructor Summary
Constructors Constructor Description PositionChangeEvent(QueuePlayer player)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable AdaptedPlayer
getPlayer()
Gets the AdaptedPlayer that this event is about.int
getPosition()
Gets the player's new position in the queueQueueServer
getQueue()
Gets the queue that this event is fromQueuePlayer
getQueuePlayer()
Gets the QueuePlayer object that represents this player
-
-
-
Constructor Detail
-
PositionChangeEvent
public PositionChangeEvent(QueuePlayer player)
-
-
Method Detail
-
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
-
-