类 PlayerSpawnLocationEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.spigotmc.event.player.PlayerSpawnLocationEvent
当玩家加入服务器后, 准备在某世界出生时触发本事件.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result -
字段概要
从类继承的字段 org.bukkit.event.player.PlayerEvent
player -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static @NotNull HandlerList获取玩家的出生点.voidsetSpawnLocation(@NotNull Location location) 设置玩家的出生点 (仅在本事件中生效).从类继承的方法 org.bukkit.event.player.PlayerEvent
getPlayer从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
PlayerSpawnLocationEvent
-
-
方法详细资料
-
getSpawnLocation
获取玩家的出生点. 如果此玩家曾在此服务器游戏过(OfflinePlayer.hasPlayedBefore()), 本位置将默认为player.dat文件中的值. 对于新玩家, 默认的出生点为主世界的出生点.原文:Gets player's spawn location. If the player
OfflinePlayer.hasPlayedBefore(), it's going to default to the location inside player.dat file. For new players, the default spawn location is spawn of the main Bukkit world.- 返回:
- 出生点
-
setSpawnLocation
设置玩家的出生点 (仅在本事件中生效).原文:Sets player's spawn location.
- 参数:
location- 出生点
-
getHandlers
- 指定者:
getHandlers在类中Event
-
getHandlerList
-