Class PlayerRespawnEvent


public class PlayerRespawnEvent extends PlayerEvent
Called when a player respawns.
  • Constructor Details Link icon

    • PlayerRespawnEvent Link icon

      @Deprecated public PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn)
      Deprecated.
    • PlayerRespawnEvent Link icon

      @Deprecated public PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn)
      Deprecated.
    • PlayerRespawnEvent Link icon

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

    • getRespawnLocation Link icon

      @NotNull public Location getRespawnLocation()
      Gets the current respawn location
      Returns:
      Location current respawn location
    • setRespawnLocation Link icon

      public void setRespawnLocation(@NotNull Location respawnLocation)
      Sets the new respawn location
      Parameters:
      respawnLocation - new location for the respawn
    • isBedSpawn Link icon

      public boolean isBedSpawn()
      Gets whether the respawn location is the player's bed.
      Returns:
      true if the respawn location is the player's bed.
    • isAnchorSpawn Link icon

      public boolean isAnchorSpawn()
      Gets whether the respawn location is the player's respawn anchor.
      Returns:
      true if the respawn location is the player's respawn anchor.
    • getRespawnReason Link icon

      @NotNull public PlayerRespawnEvent.RespawnReason getRespawnReason()
      Gets the reason this respawn event was called.
      Returns:
      the reason the event was called.
    • getHandlers Link icon

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

      @NotNull public static HandlerList getHandlerList()