Package us.ajg0702.queue.api.events
Class PreQueueEvent
- java.lang.Object
-
- us.ajg0702.queue.api.events.PreQueueEvent
-
- All Implemented Interfaces:
Cancellable
,Event
public class PreQueueEvent extends java.lang.Object implements Event, Cancellable
Called after all checks are made, right before a player is actually added to the queue. If canceled, the player will not be added to the queue. If you cancel this event, it is up to you to send a message telling the player why they were not added to the queue.
-
-
Constructor Summary
Constructors Constructor Description PreQueueEvent(AdaptedPlayer player, QueueServer target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdaptedPlayer
getPlayer()
Gets the player that is joining the queueQueueServer
getTarget()
Gets the target QueueServer that the player is trying to queue forboolean
isCancelled()
Whether this event is canceled.void
setCancelled(boolean cancelled)
Allows you to cancel or un-cancel this event
-
-
-
Constructor Detail
-
PreQueueEvent
public PreQueueEvent(AdaptedPlayer player, QueueServer target)
-
-
Method Detail
-
getPlayer
public AdaptedPlayer getPlayer()
Gets the player that is joining the queue- Returns:
-
getTarget
public QueueServer getTarget()
Gets the target QueueServer that the player is trying to queue for- Returns:
- The QueueServer that the player is trying to queue for
-
isCancelled
public boolean isCancelled()
Description copied from interface:Cancellable
Whether this event is canceled.- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- True if canceled. False if not.
-
setCancelled
public void setCancelled(boolean cancelled)
Description copied from interface:Cancellable
Allows you to cancel or un-cancel this event- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancelled
- True to cancel the event, false to un-cancel
-
-