Package org.bukkit.event.player
Class PlayerRespawnEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerRespawnEvent
public class PlayerRespawnEvent extends PlayerEvent
Called when a player respawns.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PlayerRespawnEvent(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn)
Deprecated.PlayerRespawnEvent(Player respawnPlayer, Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn)
-
Method Summary
Modifier and Type Method Description static HandlerList
getHandlerList()
HandlerList
getHandlers()
Location
getRespawnLocation()
Gets the current respawn locationboolean
isAnchorSpawn()
Gets whether the respawn location is the player's respawn anchor.boolean
isBedSpawn()
Gets whether the respawn location is the player's bed.void
setRespawnLocation(Location respawnLocation)
Sets the new respawn location
-
Constructor Details
-
PlayerRespawnEvent
@Deprecated public PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn)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.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-