Package net.md_5.bungee.api.event
Class ServerKickEvent
java.lang.Object
net.md_5.bungee.api.plugin.Event
net.md_5.bungee.api.event.ServerKickEvent
- All Implemented Interfaces:
Cancellable
Represents a player getting kicked from a server.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Constructor Summary
ConstructorDescriptionServerKickEvent
(ProxiedPlayer player, BaseComponent[] kickReasonComponent, ServerInfo cancelServer) Deprecated.ServerKickEvent
(ProxiedPlayer player, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated.ServerKickEvent
(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated.ServerKickEvent
(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Server to send player to if this event is cancelled.getCause()
Circumstances which led to the kick.The server the player was kicked from, should be used in preference toProxiedPlayer.getServer()
.Deprecated.Kick reason.Player being kicked.getState()
State in which the kick occured.int
hashCode()
boolean
Cancelled status.void
setCancelled
(boolean cancelled) Cancelled status.void
setCancelServer
(ServerInfo cancelServer) Server to send player to if this event is cancelled.void
setCause
(ServerKickEvent.Cause cause) Circumstances which led to the kick.void
setKickReason
(String reason) Deprecated.void
setKickReasonComponent
(BaseComponent[] kickReasonComponent) Kick reason.void
setState
(ServerKickEvent.State state) State in which the kick occured.toString()
-
Constructor Details
-
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, BaseComponent[] kickReasonComponent, ServerInfo cancelServer) Deprecated. -
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated. -
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated. -
ServerKickEvent
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause)
-
-
Method Details
-
getKickReason
Deprecated. -
setKickReason
Deprecated. -
isCancelled
public boolean isCancelled()Cancelled status.- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- the cancelled state of this event
-
getPlayer
Player being kicked. -
getKickedFrom
The server the player was kicked from, should be used in preference toProxiedPlayer.getServer()
. -
getKickReasonComponent
Kick reason. -
getCancelServer
Server to send player to if this event is cancelled. -
getState
State in which the kick occured. -
getCause
Circumstances which led to the kick. -
setCancelled
public void setCancelled(boolean cancelled) Cancelled status.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancelled
- the state to set
-
setKickReasonComponent
Kick reason. -
setCancelServer
Server to send player to if this event is cancelled. -
setState
State in which the kick occured. -
setCause
Circumstances which led to the kick. -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-