public class ServerConnectEvent extends Event implements Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
ServerConnectEvent.Reason |
Constructor and Description |
---|
ServerConnectEvent(ProxiedPlayer player,
ServerInfo target)
Deprecated.
|
ServerConnectEvent(ProxiedPlayer player,
ServerInfo target,
ServerConnectEvent.Reason reason)
Deprecated.
|
ServerConnectEvent(ProxiedPlayer player,
ServerInfo target,
ServerConnectEvent.Reason reason,
ServerConnectRequest request) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
ProxiedPlayer |
getPlayer()
Player connecting to a new server.
|
ServerConnectEvent.Reason |
getReason()
Reason for connecting to a new server.
|
ServerConnectRequest |
getRequest()
Request used to connect to given server.
|
@NonNull ServerInfo |
getTarget()
Server the player will be connected to.
|
int |
hashCode() |
boolean |
isCancelled()
Cancelled state.
|
void |
setCancelled(boolean cancelled)
Cancelled state.
|
void |
setTarget(@NonNull ServerInfo target)
Server the player will be connected to.
|
String |
toString() |
@Deprecated public ServerConnectEvent(ProxiedPlayer player, ServerInfo target)
@Deprecated public ServerConnectEvent(ProxiedPlayer player, ServerInfo target, ServerConnectEvent.Reason reason)
public ServerConnectEvent(ProxiedPlayer player, ServerInfo target, ServerConnectEvent.Reason reason, ServerConnectRequest request)
public ProxiedPlayer getPlayer()
@NonNull public @NonNull ServerInfo getTarget()
public ServerConnectEvent.Reason getReason()
public ServerConnectRequest getRequest()
public boolean isCancelled()
isCancelled
in interface Cancellable
public void setTarget(@NonNull @NonNull ServerInfo target)
public void setCancelled(boolean cancelled)
setCancelled
in interface Cancellable
cancelled
- the state to setprotected boolean canEqual(Object other)
Copyright © 2012–2020 SpigotMC. All rights reserved.