类 AsyncPlayerPreLoginEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.AsyncPlayerPreLoginEvent
存储尝试登录的玩家的详细信息,玩家尝试登录服务器的事件.
这个事件是异步的,不在主线程上执行.
-
嵌套类概要
嵌套类 -
构造器概要
构造器构造器说明AsyncPlayerPreLoginEvent(String name, InetAddress ipAddress) 已过时。AsyncPlayerPreLoginEvent(String name, InetAddress ipAddress, UUID uniqueId) -
方法概要
修饰符和类型方法说明voidallow()允许玩家登录.voiddisallow(AsyncPlayerPreLoginEvent.Result result, String message) 以给定的理由不允许玩家登录.voiddisallow(PlayerPreLoginEvent.Result result, String message) 已过时。获取玩家的IP地址.static HandlerList获取将要使用的踢出消息,如果getResult() !获取登录的状态.getName()获取玩家的名字.已过时。这个方法使用了来自PlayerPreLoginEvent的已弃用的枚举获取玩家的唯一标识.voidsetKickMessage(String message) 设置要显示的踢出消息,如果getResult() !void设置登录的状态.voidsetResult(PlayerPreLoginEvent.Result result) 已过时。这个方法使用了来自PlayerPreLoginEvent的已弃用的枚举从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
AsyncPlayerPreLoginEvent
已过时。 -
AsyncPlayerPreLoginEvent
-
-
方法详细资料
-
getLoginResult
获取登录的状态.原文:Gets the current result of the login, as an enum
- 返回:
- 登录的状态
-
getResult
已过时。这个方法使用了来自PlayerPreLoginEvent的已弃用的枚举获取登录的状态.原文:Gets the current result of the login, as an enum
- 返回:
- 登录的状态
- 另请参阅:
-
setLoginResult
设置登录的状态.原文:Sets the new result of the login, as an enum
- 参数:
result- 状态
-
setResult
已过时。这个方法使用了来自PlayerPreLoginEvent的已弃用的枚举设置登录的状态.原文:Sets the new result of the login, as an enum
- 参数:
result- 状态- 另请参阅:
-
getKickMessage
获取将要使用的踢出消息,如果getResult() != Result.ALLOWED.原文:Gets the current kick message that will be used if getResult() != Result.ALLOWED
- 返回:
- 踢出消息
-
setKickMessage
设置要显示的踢出消息,如果getResult() != Result.ALLOWED.原文:Sets the kick message to display if getResult() != Result.ALLOWED
- 参数:
message- 踢出消息
-
allow
public void allow()允许玩家登录.原文:Allows the player to log in
-
disallow
以给定的理由不允许玩家登录.原文:Disallows the player from logging in, with the given reason
- 参数:
result- 不允许玩家登录的理由message- 给用户显示的踢出消息
-
disallow
已过时。这个方法使用了来自PlayerPreLoginEvent的已弃用的枚举以给定的理由不允许玩家登录.原文:Disallows the player from logging in, with the given reason
- 参数:
result- 不允许玩家登录的理由message- 给用户显示的踢出消息- 另请参阅:
-
getName
获取玩家的名字.原文:Gets the player's name.
- 返回:
- 玩家名
-
getAddress
获取玩家的IP地址.原文:Gets the player IP address.
- 返回:
- IP地址
-
getUniqueId
获取玩家的唯一标识.原文:Gets the player's unique ID.
- 返回:
- UUID
-
getHandlers
- 指定者:
getHandlers在类中Event
-
getHandlerList
-
PlayerPreLoginEvent的已弃用的枚举