public class AsyncPlayerPreLoginEvent extends Event
This event is asynchronous, and not run using main thread.
Modifier and Type | Class | Description |
---|---|---|
static class |
AsyncPlayerPreLoginEvent.Result |
Basic kick reasons for communicating to plugins
|
Constructor | Description |
---|---|
AsyncPlayerPreLoginEvent(java.lang.String name,
java.net.InetAddress ipAddress) |
Deprecated.
|
AsyncPlayerPreLoginEvent(java.lang.String name,
java.net.InetAddress ipAddress,
java.util.UUID uniqueId) |
Modifier and Type | Method | Description |
---|---|---|
void |
allow() |
Allows the player to log in
|
void |
disallow(AsyncPlayerPreLoginEvent.Result result,
java.lang.String message) |
Disallows the player from logging in, with the given reason
|
void |
disallow(PlayerPreLoginEvent.Result result,
java.lang.String message) |
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
java.net.InetAddress |
getAddress() |
Gets the player IP address.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
java.lang.String |
getKickMessage() |
Gets the current kick message that will be used if getResult() !=
Result.ALLOWED
|
AsyncPlayerPreLoginEvent.Result |
getLoginResult() |
Gets the current result of the login, as an enum
|
java.lang.String |
getName() |
Gets the player's name.
|
PlayerPreLoginEvent.Result |
getResult() |
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
java.util.UUID |
getUniqueId() |
Gets the player's unique ID.
|
void |
setKickMessage(java.lang.String message) |
Sets the kick message to display if getResult() != Result.ALLOWED
|
void |
setLoginResult(AsyncPlayerPreLoginEvent.Result result) |
Sets the new result of the login, as an enum
|
void |
setResult(PlayerPreLoginEvent.Result result) |
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
getEventName, isAsynchronous
@Deprecated public AsyncPlayerPreLoginEvent(java.lang.String name, java.net.InetAddress ipAddress)
public AsyncPlayerPreLoginEvent(java.lang.String name, java.net.InetAddress ipAddress, java.util.UUID uniqueId)
public AsyncPlayerPreLoginEvent.Result getLoginResult()
@Deprecated public PlayerPreLoginEvent.Result getResult()
PlayerPreLoginEvent
getLoginResult()
public void setLoginResult(AsyncPlayerPreLoginEvent.Result result)
result
- New result to set@Deprecated public void setResult(PlayerPreLoginEvent.Result result)
PlayerPreLoginEvent
result
- New result to setsetLoginResult(Result)
public java.lang.String getKickMessage()
public void setKickMessage(java.lang.String message)
message
- New kick messagepublic void allow()
public void disallow(AsyncPlayerPreLoginEvent.Result result, java.lang.String message)
result
- New result for disallowing the playermessage
- Kick message to display to the user@Deprecated public void disallow(PlayerPreLoginEvent.Result result, java.lang.String message)
PlayerPreLoginEvent
result
- New result for disallowing the playermessage
- Kick message to display to the userdisallow(Result, String)
public java.lang.String getName()
public java.net.InetAddress getAddress()
public java.util.UUID getUniqueId()
public HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.