public class AsyncPlayerPreLoginEvent extends Event
这个事件是异步的,不在主线程上执行.
限定符和类型 | 类和说明 |
---|---|
static class |
AsyncPlayerPreLoginEvent.Result
基本的踢出理由,为了插件间的通信
|
构造器和说明 |
---|
AsyncPlayerPreLoginEvent(java.lang.String name,
java.net.InetAddress ipAddress)
已过时。
|
AsyncPlayerPreLoginEvent(java.lang.String name,
java.net.InetAddress ipAddress,
java.util.UUID uniqueId) |
限定符和类型 | 方法和说明 |
---|---|
void |
allow()
允许玩家登录.
|
void |
disallow(AsyncPlayerPreLoginEvent.Result result,
java.lang.String message)
以给定的理由不允许玩家登录.
|
void |
disallow(PlayerPreLoginEvent.Result result,
java.lang.String message)
已过时。
这个方法使用了来自
PlayerPreLoginEvent 的已弃用的枚举 |
java.net.InetAddress |
getAddress()
获取玩家的IP地址.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
java.lang.String |
getKickMessage()
获取将要使用的踢出消息,如果getResult() !
|
AsyncPlayerPreLoginEvent.Result |
getLoginResult()
获取登录的状态.
|
java.lang.String |
getName()
获取玩家的名字.
|
PlayerPreLoginEvent.Result |
getResult()
已过时。
这个方法使用了来自
PlayerPreLoginEvent 的已弃用的枚举 |
java.util.UUID |
getUniqueId()
获取玩家的唯一标识.
|
void |
setKickMessage(java.lang.String message)
设置要显示的踢出消息,如果getResult() !
|
void |
setLoginResult(AsyncPlayerPreLoginEvent.Result result)
设置登录的状态.
|
void |
setResult(PlayerPreLoginEvent.Result result)
已过时。
这个方法使用了来自
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()
原文:Gets the current result of the login, as an enum
@Deprecated public PlayerPreLoginEvent.Result getResult()
PlayerPreLoginEvent
的已弃用的枚举原文:Gets the current result of the login, as an enum
getLoginResult()
public void setLoginResult(AsyncPlayerPreLoginEvent.Result result)
原文:Sets the new result of the login, as an enum
result
- 状态@Deprecated public void setResult(PlayerPreLoginEvent.Result result)
PlayerPreLoginEvent
的已弃用的枚举原文:Sets the new result of the login, as an enum
result
- 状态setLoginResult(Result)
public java.lang.String getKickMessage()
原文:Gets the current kick message that will be used if getResult() != Result.ALLOWED
public void setKickMessage(java.lang.String message)
原文:Sets the kick message to display if getResult() != Result.ALLOWED
message
- 踢出消息public void allow()
原文:Allows the player to log in
public void disallow(AsyncPlayerPreLoginEvent.Result result, java.lang.String message)
原文:Disallows the player from logging in, with the given reason
result
- 不允许玩家登录的理由message
- 给用户显示的踢出消息@Deprecated public void disallow(PlayerPreLoginEvent.Result result, java.lang.String message)
PlayerPreLoginEvent
的已弃用的枚举原文:Disallows the player from logging in, with the given reason
result
- 不允许玩家登录的理由message
- 给用户显示的踢出消息disallow(Result, String)
public java.lang.String getName()
原文:Gets the player's name.
public java.net.InetAddress getAddress()
原文:Gets the player IP address.
public java.util.UUID getUniqueId()
原文:Gets the player's unique ID.
public HandlerList getHandlers()
getHandlers
在类中 Event
public static HandlerList getHandlerList()