Teleport (Effect) — Skript

Addon: Skript · Category: Effect · Since: 1.0, 2.10 (flags)

Syntax

[force] teleport %entities% (to|%direction%) %location% [[while] retaining %-teleportflags%]

Description

Teleport an entity to a specific location. This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be used after this effect. The keyword 'force' indicates this effect will not be delayed, which may cause lag spikes or server crashes when using this effect to teleport entities to unloaded chunks. Teleport flags are settings to retain during a teleport. Such as direction, passengers, x coordinate, etc.

Examples

teleport the player to {home::%uuid of player%}
teleport the attacker to the victim
on dismount:
	cancel event
	teleport the player to {server::spawn} retaining vehicle and passengers

View source