Class 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 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: Cancellable
        Whether this event is canceled.
        Specified by:
        isCancelled in interface Cancellable
        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 interface Cancellable
        Parameters:
        cancelled - True to cancel the event, false to un-cancel