public interface RespawnPlayerEvent extends TargetPlayerEvent
Player is cloned during a respawn.
Either caused by death, or by traveling from the End.
| Modifier and Type | Method and Description |
|---|---|
Transform<World> |
getFromTransform()
Gets a copy of the transform that the entity came from.
|
Player |
getOriginalPlayer()
The original
Player that this new player is a clone of. |
Transform<World> |
getToTransform()
Gets the new transform that the
Player will change to. |
boolean |
isBedSpawn()
Gets whether the transform was set by a bed or not.
|
boolean |
isDeath()
Gets whether this event was fired because the
Player died. |
void |
setToTransform(Transform<World> respawnTransform)
Sets the new transform that the entity will change to.
|
getTargetEntitygetCause, getContext, getSourcePlayer getOriginalPlayer()
Player that this new player is a clone of.
When a player dies, or leaves The End, their Player is re-created.
Transform<World> getFromTransform()
Transform<World> getToTransform()
Player will change to.void setToTransform(Transform<World> respawnTransform)
respawnTransform - The new transformboolean isBedSpawn()
boolean isDeath()
Player died.true if player died, false if the player switched
dimensions