Class ServerKickEvent

java.lang.Object
net.md_5.bungee.api.plugin.Event
net.md_5.bungee.api.event.ServerKickEvent
All Implemented Interfaces:
Cancellable

public class ServerKickEvent extends Event implements Cancellable
Represents a player getting kicked from a server.
  • Constructor Details

  • Method Details

    • getKickReason

      @Deprecated public String getKickReason()
      Deprecated.
      use component methods instead
      Returns:
      the kick reason
    • setKickReason

      @Deprecated public void setKickReason(String reason)
      Deprecated.
      use component methods instead
      Parameters:
      reason - the kick reason
    • getKickReasonComponent

      @Deprecated public net.md_5.bungee.api.chat.BaseComponent[] getKickReasonComponent()
      Deprecated.
      use single component methods instead
      Returns:
      the kick reason
    • setKickReasonComponent

      @Deprecated public void setKickReasonComponent(net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent)
      Deprecated.
      use single component methods instead
      Parameters:
      kickReasonComponent - the kick reason
    • isCancelled

      public boolean isCancelled()
      Cancelled status.
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      the cancelled state of this event
    • getPlayer

      public ProxiedPlayer getPlayer()
      Player being kicked.
    • getKickedFrom

      public ServerInfo getKickedFrom()
      The server the player was kicked from, should be used in preference to ProxiedPlayer.getServer().
    • getReason

      public net.md_5.bungee.api.chat.BaseComponent getReason()
      Kick reason.
    • getCancelServer

      public ServerInfo getCancelServer()
      Server to send player to if this event is cancelled.
    • getState

      public ServerKickEvent.State getState()
      State in which the kick occured.
    • setCancelled

      public void setCancelled(boolean cancelled)
      Cancelled status.
      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancelled - the state to set
    • setReason

      public void setReason(net.md_5.bungee.api.chat.BaseComponent reason)
      Kick reason.
    • setCancelServer

      public void setCancelServer(ServerInfo cancelServer)
      Server to send player to if this event is cancelled.
    • setState

      public void setState(ServerKickEvent.State state)
      State in which the kick occured.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object