public class ServerKickEvent extends Event implements Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerKickEvent.State |
| Constructor and 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) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
ServerInfo |
getCancelServer()
Server to send player to if this event is cancelled.
|
ServerInfo |
getKickedFrom()
The server the player was kicked from, should be used in preference to
ProxiedPlayer.getServer(). |
String |
getKickReason()
Deprecated.
|
BaseComponent[] |
getKickReasonComponent()
Kick reason.
|
ProxiedPlayer |
getPlayer()
Player being kicked.
|
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 |
setKickReason(String reason)
Deprecated.
|
void |
setKickReasonComponent(BaseComponent[] kickReasonComponent)
Kick reason.
|
void |
setState(ServerKickEvent.State state)
State in which the kick occured.
|
String |
toString() |
@Deprecated public ServerKickEvent(ProxiedPlayer player, BaseComponent[] kickReasonComponent, ServerInfo cancelServer)
@Deprecated public ServerKickEvent(ProxiedPlayer player, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state)
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, ServerKickEvent.State state)
@Deprecated public String getKickReason()
@Deprecated public void setKickReason(String reason)
public boolean isCancelled()
isCancelled in interface Cancellablepublic ProxiedPlayer getPlayer()
public ServerInfo getKickedFrom()
ProxiedPlayer.getServer().public BaseComponent[] getKickReasonComponent()
public ServerInfo getCancelServer()
public ServerKickEvent.State getState()
public void setCancelled(boolean cancelled)
setCancelled in interface Cancellablecancelled - the state to setpublic void setKickReasonComponent(BaseComponent[] kickReasonComponent)
public void setCancelServer(ServerInfo cancelServer)
public void setState(ServerKickEvent.State state)
protected boolean canEqual(Object other)
Copyright © 2012–2020 SpigotMC. All rights reserved.