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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enum to specify the reason a respawn event was called.Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerRespawnEvent
(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn) Deprecated.PlayerRespawnEvent
(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) Deprecated.PlayerRespawnEvent
(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, PlayerRespawnEvent.RespawnReason respawnReason) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList
Gets the current respawn locationGets the reason this respawn event was called.boolean
Gets whether the respawn location is the player's respawn anchor.boolean
Gets whether the respawn location is the player's bed.void
setRespawnLocation
(Location respawnLocation) Sets the new respawn locationMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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
-
-
Method Details
-
getRespawnLocation
Gets the current respawn location- Returns:
- Location current respawn location
-
setRespawnLocation
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
Gets the reason this respawn event was called.- Returns:
- the reason the event was called.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-