Class PlayerRespawnEvent


public class PlayerRespawnEvent extends AbstractRespawnEvent
Called when a player respawns.

If changing player state, see PlayerPostRespawnEvent because the player is "reset" between this event and that event and some changes won't persist.

  • Constructor Details

    • PlayerRespawnEvent

      @Internal @Deprecated(since="1.16.1", forRemoval=true) public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PlayerRespawnEvent

      @Internal @Deprecated(since="1.19.4", forRemoval=true) public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • PlayerRespawnEvent

      @Internal public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, boolean missingRespawnBlock, @NotNull @NotNull PlayerRespawnEvent.RespawnReason respawnReason)
  • Method Details

    • setRespawnLocation

      public void setRespawnLocation(@NotNull @NotNull Location respawnLocation)
      Sets the new respawn location.
      Parameters:
      respawnLocation - new location for the respawn
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()