Class PlayerRespawnEvent
java.lang.Object
net.minestom.server.event.player.PlayerRespawnEvent
- All Implemented Interfaces:
Event, EntityEvent, EntityInstanceEvent, InstanceEvent, PlayerEvent, PlayerInstanceEvent
Called when
Player.respawn() is executed (for custom respawn or as a result of
ClientStatusPacket-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the player.Gets the respawn position.voidsetRespawnPosition(Pos respawnPosition) Changes the respawn position.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityInstanceEvent
getInstanceMethods inherited from interface PlayerEvent
getEntity
-
Constructor Details
-
PlayerRespawnEvent
-
-
Method Details
-
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
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-