Package us.ajg0702.queue.api.events
Class PositionChangeEvent
java.lang.Object
us.ajg0702.queue.api.events.PositionChangeEvent
- All Implemented Interfaces:
Event
Called when someone is added or removed from a queue that the player is in, causing the player's position to change
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable AdaptedPlayerGets the AdaptedPlayer that this event is about.intGets the player's new position in the queuegetQueue()Gets the queue that this event is fromGets the QueuePlayer object that represents this player
-
Constructor Details
-
PositionChangeEvent
-
-
Method Details
-
getQueuePlayer
Gets the QueuePlayer object that represents this player- Returns:
- the QueuePlayer object
-
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
Gets the queue that this event is from- Returns:
- The QueueServer that the player is in that their position changed
-