Class PlayerRespawnEvent

java.lang.Object
net.minestom.server.event.player.PlayerRespawnEvent
All Implemented Interfaces:
Event, EntityEvent, PlayerEvent

public class PlayerRespawnEvent extends Object implements PlayerEvent
Called when Player.respawn() is executed (for custom respawn or as a result of ClientStatusPacket
  • Constructor Details

    • PlayerRespawnEvent

      public PlayerRespawnEvent(@NotNull @NotNull Player player)
  • Method Details

    • getRespawnPosition

      @NotNull public @NotNull Pos getRespawnPosition()
      Gets the respawn position.

      Is by default Player.getRespawnPoint()

      Returns:
      the respawn position
    • setRespawnPosition

      public void setRespawnPosition(@NotNull @NotNull Pos respawnPosition)
      Changes the respawn position.
      Parameters:
      respawnPosition - the new respawn position
    • getPlayer

      @NotNull public @NotNull Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player