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
-
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
Constructors Constructor Description PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull HandlerList
getHandlerList()
@NotNull HandlerList
getHandlers()
@NotNull Location
getRespawnLocation()
Gets the current respawn locationboolean
isBedSpawn()
Gets whether the respawn location is the player's bed.void
setRespawnLocation(@NotNull Location respawnLocation)
Sets the new respawn location-
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Method Detail
-
getRespawnLocation
@NotNull public @NotNull Location getRespawnLocation()
Gets the current respawn location- Returns:
- Location current respawn location
-
setRespawnLocation
public void setRespawnLocation(@NotNull @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.
-
getHandlers
@NotNull public @NotNull HandlerList getHandlers()
- Specified by:
getHandlers
in classEvent
-
getHandlerList
@NotNull public static @NotNull HandlerList getHandlerList()
-
-