程序包 org.bukkit.event.player

# 类 PlayerRespawnEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerRespawnEvent

public class PlayerRespawnEvent extends PlayerEvent
玩家重生事件.

- ## 嵌套类概要

  嵌套类
  修饰符和类型
  类
  说明
  `static enum`
  `PlayerRespawnEvent.RespawnReason`
  An enum to specify the reason a respawn event was called.

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

  `Event.Result`

- ## 字段概要

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

  `player`

- ## 构造器概要

  构造器
  构造器
  说明
  `PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn)`
  已过时。
  `PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn)`
  已过时。
  `PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull PlayerRespawnEvent.RespawnReason respawnReason)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `static @NotNull HandlerList`
  `getHandlerList()`
  `@NotNull HandlerList`
  `getHandlers()`
  `@NotNull Location`
  `getRespawnLocation()`
  获取当前重生的位置.
  `@NotNull PlayerRespawnEvent.RespawnReason`
  `getRespawnReason()`
  Gets the reason this respawn event was called.
  `boolean`
  `isAnchorSpawn()`
  Gets whether the respawn location is the player's respawn anchor.
  `boolean`
  `isBedSpawn()`
  获取此玩家是否在他的床上重生.
  `void`
  `setRespawnLocation(@NotNull Location respawnLocation)`
  设置一个新的重生位置.

  ### 从类继承的方法 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`

- ## 构造器详细资料

  - ### PlayerRespawnEvent

    @Deprecated public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn)
    已过时。

  - ### PlayerRespawnEvent

    @Deprecated public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn)
    已过时。

  - ### PlayerRespawnEvent

    public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull @NotNull PlayerRespawnEvent.RespawnReason respawnReason)

- ## 方法详细资料

  - ### getRespawnLocation

    @NotNull public @NotNull Location getRespawnLocation()
    获取当前重生的位置.

    原文:Gets the current respawn location

    返回:
      玩家重生位置

  - ### setRespawnLocation

    public void setRespawnLocation(@NotNull @NotNull Location respawnLocation)
    设置一个新的重生位置.

    原文:Sets the new respawn location

    参数:
      `respawnLocation` - 新的重生位置

  - ### isBedSpawn

    public boolean isBedSpawn()
    获取此玩家是否在他的床上重生.

    原文:Gets whether the respawn location is the player's bed.

    返回:
      玩家是否重生在床上

  - ### isAnchorSpawn

    public boolean isAnchorSpawn()
    Gets whether the respawn location is the player's respawn anchor.
    返回:
      true if the respawn location is the player's respawn anchor.

  - ### getRespawnReason

    @NotNull public @NotNull PlayerRespawnEvent.RespawnReason getRespawnReason()
    Gets the reason this respawn event was called.
    返回:
      the reason the event was called.

  - ### getHandlers

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

  - ### getHandlerList

    @NotNull public static @NotNull HandlerList getHandlerList()