Package net.minestom.server.event.player
Class PlayerRespawnEvent
java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.player.PlayerRespawnEvent
public class PlayerRespawnEvent extends Event
Called when
Player.respawn()
is executed (for custom respawn or as a result of
ClientStatusPacket
-
Constructor Summary
Constructors Constructor Description PlayerRespawnEvent(Player player)
-
Method Summary
Modifier and Type Method Description Player
getPlayer()
Gets the player who is respawning.Position
getRespawnPosition()
Gets the respawn position.void
setRespawnPosition(Position respawnPosition)
Changes the respawn position.
-
Constructor Details
-
Method Details
-
getPlayer
Gets the player who is respawning.- Returns:
- the player
-
getRespawnPosition
Gets the respawn position.Is by default
Player.getRespawnPoint()
- Returns:
- the respawn position
-
setRespawnPosition
Changes the respawn position.- Parameters:
respawnPosition
- the new respawn position
-