Class PlayerRespawnEvent


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

    • PlayerRespawnEvent

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

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

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

    • getRespawnLocation

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

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

      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

      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

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

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

      @NotNull public static HandlerList getHandlerList()