InstancePlayerMovement

public final class InstancePlayerMovement

Performs narrowly scoped player movement which instance escape protection may accept. Authorization exists only on the synchronous call stack, is bound to one player and exact destination, and is always removed in finally; it cannot authorize another player's teleport or a later event.

Functions

Link copied to clipboard
public static boolean teleportLeavingInstance(Player player, Location destination, PlayerTeleportEvent.TeleportCause cause)
An explicit exit counts as quitting only after Bukkit accepts and completes the teleport.
Link copied to clipboard
public static boolean teleportWithinWorld(Player player, Location destination, PlayerTeleportEvent.TeleportCause cause)
Moves a player without weakening instance escape protection.