Name | Teleport |
Syntax | teleport (<entity>|...) [<location>] (cause:<cause>) (entity_options:<option>|...) (relative) (relative_axes:<axis>|...) (offthread_repeat:<#>) (offthread_yaw) (offthread_pitch) |
Short Description | Teleports the entity(s) to a new location. |
Full Description | Teleports the entity or entities to the new location.
Entities can be teleported between worlds using this command. You may optionally specify a teleport cause for player entities, allowing proper teleport event handling. When not specified, this is "PLUGIN". See teleport cause for causes. Instead of a valid entity, an unspawned NPC or an offline player may also be used. Optionally specify "relative" to use relative teleportation (Paper only). This is primarily useful only for players, but available for all entities. Relative teleports are smoother for the client when teleporting over short distances. Optionally, you may use "relative_axes:" to specify a set of axes to move relative on (and other axes will be treated as absolute), as any of "X", "Y", "Z", "YAW", "PITCH". Optionally, you may use "offthread_repeat:" with the relative arg when teleporting a player to smooth out the teleport with a specified number of extra async packets sent within a single tick. Optionally, specify "offthread_yaw" or "offthread_pitch" while using offthread_repeat to smooth the player's yaw/pitch to the new location's yaw/pitch. Optionally, specify additional teleport options using the 'entity_options:' arguments (Paper only). This allows things like retaining an open inventory when teleporting - see the links below for more information. See https://jd.papermc.io/paper/1.19/io/papermc/paper/entity/TeleportFlag.EntityState.html for all possible options. Note that the API this is based on is marked as experimental in Paper, and so may change in the future. |
Related Tags | <EntityTag.location> Returns the location of the entity. (...)
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Synonyms (Search Aid) | tp |
Group | entity |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/TeleportCommand.java#L39 |