Skip to content

Teleport

LLytho edited this page Oct 17, 2022 · 4 revisions

Teleport

This event is used to detect teleports through ender pearls or chorus fruits.
The event can be cancelled to prevent the teleportation.

onEvent("morejs.teleport", (event) => {
    /**
     * `event.entity`: Entity that is teleported
     * `event.type`: Type of the teleport. Either "ender_pearl" or "chorus_fruit"
     * `event.x`: X coordinate of the teleport. Can be set.
     * `event.y`: Y coordinate of the teleport. Can be set.
     * `event.z`: Z coordinate of the teleport. Can be set.
     */
});

Clone this wiki locally