teleportWithEffect

fun SpigotPlayer.teleportWithEffect(location: Location, potionEffectType: PotionEffectType = PotionEffectType.SLOWNESS)

Teleports a player to a specified location with a temporary visual potion effect.

This method applies a potion effect to the player, teleports them to the given location, and then removes the effect immediately after teleportation.

Parameters

location

The target location to which the player will be teleported.

potionEffectType

The type of potion effect to be applied temporarily. Defaults to PotionEffectType.SLOWNESS.


Teleports the player to the specified entity's location while applying a visual effect.

Parameters

to

The target entity whose location the player will be teleported to.