public class PlayerConnectEvent extends PlayerEvent implements Cancellable
PlayerSpawnEvent.PlayerSpawnEvent,
PlayerDisconnectEvent| Constructor and Description |
|---|
PlayerConnectEvent(Player player,
boolean newPlayer) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDisconnectReason()
Gets the reason why the player will be disconnected.
|
boolean |
isCancelled()
Determines if the event is cancelled.
|
boolean |
isNewPlayer()
Gets whether or not this is a new player, i.e. this is the first time this
player connects to this server.
|
void |
setCancelled(boolean cancel)
Cancels this event.
|
void |
setDisconnectReason(java.lang.String reason)
If you cancel the event, the player will be disconnected from the server.
|
getPlayerpublic PlayerConnectEvent(Player player, boolean newPlayer)
public void setDisconnectReason(java.lang.String reason)
reason - the reason why the player was disconnected.public java.lang.String getDisconnectReason()
public boolean isNewPlayer()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - set to true if you want to cancel this event.