Package us.ajg0702.queue.api.events
Class AutoQueueOnKickEvent
java.lang.Object
us.ajg0702.queue.api.events.AutoQueueOnKickEvent
- All Implemented Interfaces:
Cancellable,Event
Called before AjQueue auto-queues a player for a server. (on player kick)
Use Case: View/Change the server that the player is auto-queued for.
If canceled, the player will not be queued to any server.
If you cancel this event, it is up to you to send a message telling the player why they were not auto-queued.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this event is canceled.voidsetCancelled(boolean cancelled) Allows you to cancel or un-cancel this eventvoidsetTargetServer(String targetServer) Set the name of the server AjQueue will queue the player for.
-
Constructor Details
-
AutoQueueOnKickEvent
-
-
Method Details
-
getPlayer
- Returns:
- the player that is being re-queued
-
getTargetServer
- Returns:
- The name of the server AjQueue will queue the player for.
-
setTargetServer
Set the name of the server AjQueue will queue the player for.- Parameters:
targetServer- The name of the server to queue the player for.
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableWhether this event is canceled.- Specified by:
isCancelledin interfaceCancellable- Returns:
- True if canceled. False if not.
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableAllows you to cancel or un-cancel this event- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancelled- True to cancel the event, false to un-cancel
-