Package org.bukkit.event.player
Class PlayerRespawnEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.AbstractRespawnEvent
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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumAn 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 io.papermc.paper.event.player.AbstractRespawnEvent
respawnLocationFields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn) Deprecated, for removal: This API element is subject to removal in a future version.PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) Deprecated, for removal: This API element is subject to removal in a future version.PlayerRespawnEvent(@NotNull Player respawnPlayer, @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn, boolean missingRespawnBlock, @NotNull PlayerRespawnEvent.RespawnReason respawnReason) -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerListvoidsetRespawnLocation(@NotNull Location respawnLocation) Sets the new respawn location.Methods inherited from class io.papermc.paper.event.player.AbstractRespawnEvent
getRespawnFlags, getRespawnLocation, getRespawnReason, isAnchorSpawn, isBedSpawn, isMissingRespawnBlockMethods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventContext, getEventName, isAsynchronous, isSupportInterrupt
-
Constructor Details
-
PlayerRespawnEvent
@Internal @Deprecated(since="1.16.1", forRemoval=true) public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn) Deprecated, for removal: This API element is subject to removal in a future version. -
PlayerRespawnEvent
@Internal @Deprecated(since="1.19.4", forRemoval=true) public PlayerRespawnEvent(@NotNull @NotNull Player respawnPlayer, @NotNull @NotNull Location respawnLocation, boolean isBedSpawn, boolean isAnchorSpawn) Deprecated, for removal: This API element is subject to removal in a future version. -
PlayerRespawnEvent
-
-
Method Details
-
setRespawnLocation
Sets the new respawn location.- Parameters:
respawnLocation- new location for the respawn
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-