Package us.ajg0702.queue.api.events
Class AutoQueueOnKickEvent
- java.lang.Object
-
- us.ajg0702.queue.api.events.AutoQueueOnKickEvent
-
- All Implemented Interfaces:
Cancellable,Event
public class AutoQueueOnKickEvent extends java.lang.Object implements Event, Cancellable
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 Constructor Description AutoQueueOnKickEvent(AdaptedPlayer player, java.lang.String targetServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdaptedPlayergetPlayer()java.lang.StringgetTargetServer()booleanisCancelled()Whether this event is canceled.voidsetCancelled(boolean cancelled)Allows you to cancel or un-cancel this eventvoidsetTargetServer(java.lang.String targetServer)Set the name of the server AjQueue will queue the player for.
-
-
-
Constructor Detail
-
AutoQueueOnKickEvent
public AutoQueueOnKickEvent(AdaptedPlayer player, java.lang.String targetServer)
-
-
Method Detail
-
getPlayer
public AdaptedPlayer getPlayer()
- Returns:
- the player that is being re-queued
-
getTargetServer
public java.lang.String getTargetServer()
- Returns:
- The name of the server AjQueue will queue the player for.
-
setTargetServer
public void setTargetServer(java.lang.String targetServer)
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
-
-