程序包 org.spigotmc.event.player

# 类 PlayerSpawnLocationEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.spigotmc.event.player.PlayerSpawnLocationEvent

public class PlayerSpawnLocationEvent extends PlayerEvent
当玩家加入服务器后, 准备在某世界出生时触发本事件.

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 org.bukkit.event.Event

  `Event.Result`

- ## 字段概要

  ### 从类继承的字段 org.bukkit.event.player.PlayerEvent

  `player`

- ## 构造器概要

  构造器
  构造器
  说明
  `PlayerSpawnLocationEvent(@NotNull Player who, @NotNull Location spawnLocation)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `static @NotNull HandlerList`
  `getHandlerList()`
  `@NotNull HandlerList`
  `getHandlers()`
  `@NotNull Location`
  `getSpawnLocation()`
  获取玩家的出生点.
  `void`
  `setSpawnLocation(@NotNull Location location)`
  设置玩家的出生点 (仅在本事件中生效).

  ### 从类继承的方法 org.bukkit.event.player.PlayerEvent

  `getPlayer`

  ### 从类继承的方法 org.bukkit.event.Event

  `getEventName, isAsynchronous`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### PlayerSpawnLocationEvent

    public PlayerSpawnLocationEvent(@NotNull @NotNull Player who, @NotNull @NotNull Location spawnLocation)

- ## 方法详细资料

  - ### getSpawnLocation

    @NotNull public @NotNull Location 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

    public void setSpawnLocation(@NotNull @NotNull Location location)
    设置玩家的出生点 (仅在本事件中生效).

    原文:Sets player's spawn location.

    参数:
      `location` - 出生点

  - ### getHandlers

    @NotNull public @NotNull HandlerList getHandlers()
    指定者:
      `getHandlers` 在类中 `Event`

  - ### getHandlerList

    @NotNull public static @NotNull HandlerList getHandlerList()