Package us.ajg0702.queue.api.events
Class PriorityCalculationEvent
java.lang.Object
us.ajg0702.queue.api.events.PriorityCalculationEvent
- All Implemented Interfaces:
Event
Event that is called when priorities are calculated.
You can provide dynamic priorities for your players based on your own criteria
instead of just permissions
Just listen to this event, and use the addPriority method to add a priority. If it is higher than a player's other priorities, it will be used.
If running ajQueue (not ajQueuePlus), then any number bigger than 0 will count as priority
Just listen to this event, and use the addPriority method to add a priority. If it is higher than a player's other priorities, it will be used.
If running ajQueue (not ajQueuePlus), then any number bigger than 0 will count as priority
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPriority(int priority) Adds a priority.intGets the current highest priority
-
Constructor Details
-
PriorityCalculationEvent
-
-
Method Details
-
getHighestPriority
public int getHighestPriority()Gets the current highest priority- Returns:
- The highest priority number
-
addPriority
public void addPriority(int priority) Adds a priority. Does nothing if the priority is lower than the player already has- Parameters:
priority- the priority to add
-