teleport
inline fun <E : Entity> E.teleport(targetWorld: ServerWorld, location: TeleportTarget): E?
Content copied to clipboard
Teleport this entity to the targetWorld at the given location. If location is null, the entity will not be teleported. If the entity in the teleported location is not the same type and is not null, an exception will be thrown. Otherwise, the teleported entity (or null) will be returned.
If the entity is unable to be teleported, this returns null.
Every entity put into the world is a new copy of the entity, unless the given entity is already in the world or is the player.
Author
sschr15