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
public class ServerKickEvent extends Event implements Cancellable
Represents a player getting kicked from a server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServerKickEvent.Cause
static class
ServerKickEvent.State
-
Constructor Summary
Constructors Constructor Description ServerKickEvent(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[] reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause)
ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state)
Deprecated.ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
ServerInfo
getCancelServer()
Server to send player to if this event is cancelled.ServerKickEvent.Cause
getCause()
Circumstances which led to the kick.ServerInfo
getKickedFrom()
The server the player was kicked from, should be used in preference toProxiedPlayer.getServer()
.String
getKickReason()
Deprecated.use component methods insteadBaseComponent[]
getKickReasonComponent()
Deprecated.use single component methods insteadProxiedPlayer
getPlayer()
Player being kicked.BaseComponent
getReason()
Kick reason.ServerKickEvent.State
getState()
State in which the kick occured.int
hashCode()
boolean
isCancelled()
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.use component methods insteadvoid
setKickReasonComponent(BaseComponent[] kickReasonComponent)
Deprecated.use single component methods insteadvoid
setReason(BaseComponent reason)
Kick reason.void
setState(ServerKickEvent.State state)
State in which the kick occured.String
toString()
-
-
-
Constructor Detail
-
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
@Deprecated public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state)
Deprecated.
-
ServerKickEvent
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause)
-
ServerKickEvent
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent reason, ServerInfo cancelServer, ServerKickEvent.State state, ServerKickEvent.Cause cause)
-
-
Method Detail
-
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 BaseComponent[] getKickReasonComponent()
Deprecated.use single component methods instead- Returns:
- the kick reason
-
setKickReasonComponent
@Deprecated public void setKickReasonComponent(BaseComponent[] kickReasonComponent)
Deprecated.use single component methods instead- Parameters:
kickReasonComponent
- the kick reason
-
isCancelled
public boolean isCancelled()
Cancelled status.- Specified by:
isCancelled
in interfaceCancellable
- 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 toProxiedPlayer.getServer()
.
-
getReason
public 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.
-
getCause
public ServerKickEvent.Cause 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
-
setReason
public void setReason(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.
-
setCause
public void setCause(ServerKickEvent.Cause cause)
Circumstances which led to the kick.
-
canEqual
protected boolean canEqual(Object other)
-
-