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) Creates an event. -
Method Summary
Modifier and TypeMethodDescriptioncause()location()player()Returns the player involved in this event.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) Creates an event.- Parameters:
player- the player about to respawnworld- the world they are about to respawn inlocation- the position they are about to respawn atcause- what triggered the respawnusedRespawnPoint- whether the position comes from the player's respawn point- Since:
- 0.1.0
-
-
Method Details
-
player
Description copied from interface:PlayerEventReturns the player involved in this event.- Specified by:
playerin interfacePlayerEvent- Returns:
- the player involved in this event
-
world
-
location
-
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
-