Package org.bukkit.event.player
Class PlayerRespawnEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerRespawnEvent
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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic enumAn enum to specify the reason a respawn event was called.Nested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn) Deprecated.PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) Deprecated.PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull PlayerRespawnEvent.RespawnReason respawnReason) Deprecated.PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull PlayerRespawnEvent.RespawnReason respawnReason, ImmutableSet.Builder<PlayerRespawnEvent.RespawnFlag> respawnFlags) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListGet the set of flags that apply to this respawn.Gets the current respawn locationGets the reason this respawn event was called.booleanGets whether the respawn location is the player's respawn anchor.booleanGets whether the respawn location is the player's bed.voidsetRespawnLocation(@NotNull Location respawnLocation) Sets the new respawn locationMethods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerRespawnEvent@Deprecated public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn) Deprecated.
- 
PlayerRespawnEvent@Deprecated public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) Deprecated.
- 
PlayerRespawnEvent@Deprecated public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull @NotNull PlayerRespawnEvent.RespawnReason respawnReason) Deprecated.
- 
PlayerRespawnEventpublic PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, @NotNull @NotNull PlayerRespawnEvent.RespawnReason respawnReason, @NotNull ImmutableSet.Builder<PlayerRespawnEvent.RespawnFlag> respawnFlags) 
 
- 
- 
Method Details- 
getRespawnLocationGets the current respawn location- Returns:
- Location current respawn location
 
- 
setRespawnLocationSets the new respawn location- Parameters:
- respawnLocation- new location for the respawn
 
- 
isBedSpawnpublic boolean isBedSpawn()Gets whether the respawn location is the player's bed.- Returns:
- true if the respawn location is the player's bed.
 
- 
isAnchorSpawnpublic 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.
 
- 
getRespawnReasonGets the reason this respawn event was called.- Returns:
- the reason the event was called.
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
- 
getRespawnFlagsGet the set of flags that apply to this respawn.- Returns:
- an immutable set of the flags that apply to this respawn
 
 
-