Class PlayerRespawnEvent

java.lang.Object
fr.fidorial.event.player.PlayerRespawnEvent
All Implemented Interfaces:
Event, PlayerEvent

public final class PlayerRespawnEvent extends Object implements PlayerEvent
Fired when a dead player clicks respawn, before they are placed back in the world.
Since:
0.1.0
  • Constructor Details

  • Method Details

    • player

      @Contract(pure=true) public Player player()
      Specified by:
      player in interface PlayerEvent
    • world

      @Contract(pure=true) public World world()
      Returns:
      the world the player is about to respawn in
    • location

      @Contract(pure=true) public Location location()
      Returns:
      the position the player is about to respawn at
    • cause

      public PlayerRespawnEvent.Cause cause()
      Returns:
      what triggered this respawn
      Since:
      0.1.0
    • usedRespawnPoint

      public boolean usedRespawnPoint()
      Returns:
      true when the position comes from the player's respawn point, false when it is the world spawn
      Since:
      0.1.0
    • setRespawnLocation

      public void setRespawnLocation(World world, Location location)
      Parameters:
      world - the world to respawn in instead
      location - the position to respawn at instead
    • setRespawnLocation

      public void setRespawnLocation(Location location)
      Parameters:
      location - the position to respawn at instead, in the same world
    • setRespawnLocation

      public void setRespawnLocation(RespawnPoint point)
      Parameters:
      point - the point to respawn at instead
      Since:
      0.1.0