Class PlayerRespawnEvent
java.lang.Object
fr.fidorial.event.player.PlayerRespawnEvent
- All Implemented Interfaces:
Event, PlayerEvent
Fired when a dead player clicks respawn, before they are placed back in the world.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat made the player respawn. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerRespawnEvent(Player player, World world, Location location, PlayerRespawnEvent.Cause cause, boolean usedRespawnPoint) -
Method Summary
Modifier and TypeMethodDescriptioncause()location()player()voidsetRespawnLocation(RespawnPoint point) voidsetRespawnLocation(Location location) voidsetRespawnLocation(World world, Location location) booleanworld()
-
Constructor Details
-
PlayerRespawnEvent
public PlayerRespawnEvent(Player player, World world, Location location, PlayerRespawnEvent.Cause cause, boolean usedRespawnPoint)
-
-
Method Details
-
player
- Specified by:
playerin interfacePlayerEvent
-
world
- Returns:
- the world the player is about to respawn in
-
location
- Returns:
- the position the player is about to respawn at
-
cause
- Returns:
- what triggered this respawn
- Since:
- 0.1.0
-
usedRespawnPoint
public boolean usedRespawnPoint()- Returns:
truewhen the position comes from the player's respawn point,falsewhen it is the world spawn- Since:
- 0.1.0
-
setRespawnLocation
-
setRespawnLocation
- Parameters:
location- the position to respawn at instead, in the same world
-
setRespawnLocation
- Parameters:
point- the point to respawn at instead- Since:
- 0.1.0
-