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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionServerKickEvent(ProxiedPlayer player, net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent, ServerInfo cancelServer) Deprecated.ServerKickEvent(ProxiedPlayer player, net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated.ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated.ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent[] reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause) ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated.ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanServer 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.use component methods insteadnet.md_5.bungee.api.chat.BaseComponent[]Deprecated.use single component methods insteadPlayer being kicked.net.md_5.bungee.api.chat.BaseComponentKick reason.getState()State in which the kick occured.inthashCode()booleanCancelled status.voidsetCancelled(boolean cancelled) Cancelled status.voidsetCancelServer(ServerInfo cancelServer) Server to send player to if this event is cancelled.voidsetCause(ServerKickEvent.Cause cause) Circumstances which led to the kick.voidsetKickReason(String reason) Deprecated.use component methods insteadvoidsetKickReasonComponent(net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent) Deprecated.use single component methods insteadvoidsetReason(net.md_5.bungee.api.chat.BaseComponent reason) Kick reason.voidsetState(ServerKickEvent.State state) State in which the kick occured.toString()
-
Constructor Details
-
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent, ServerInfo cancelServer) Deprecated. -
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated. -
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated. -
ServerKickEvent
@Deprecated public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state) Deprecated. -
ServerKickEvent
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent[] reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause) -
ServerKickEvent
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, net.md_5.bungee.api.chat.BaseComponent reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause)
-
-
Method Details
-
getKickReason
Deprecated.use component methods instead- Returns:
- the kick reason
-
setKickReason
Deprecated.use component methods instead- Parameters:
reason- the kick reason
-
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:
isCancelledin 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(). -
getReason
public net.md_5.bungee.api.chat.BaseComponent getReason()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:
setCancelledin interfaceCancellable- Parameters:
cancelled- the state to set
-
setReason
public void setReason(net.md_5.bungee.api.chat.BaseComponent reason) 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()
-