Package org.bukkit.event.player

# Class PlayerTeleportEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerMoveEvent
org.bukkit.event.player.PlayerTeleportEvent

All Implemented Interfaces:
  `Cancellable`

Direct Known Subclasses:
  `PlayerPortalEvent`, `PlayerTeleportEndGatewayEvent`

public class PlayerTeleportEvent extends PlayerMoveEvent
Holds information for player teleport events

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`PlayerTeleportEvent.TeleportCause`

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

### Fields inherited from class org.bukkit.event.player.PlayerEvent

`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerTeleportEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to)`
`PlayerTeleportEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull PlayerTeleportEvent.TeleportCause`
`getCause()`
Gets the cause of this teleportation event
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`

### Methods inherited from class org.bukkit.event.player.PlayerMoveEvent

`getFrom, getTo, hasChangedBlock, hasChangedOrientation, hasChangedPosition, hasExplicitlyChangedBlock, hasExplicitlyChangedPosition, isCancelled, setCancelled, setFrom, setTo`

### Methods inherited from class org.bukkit.event.player.PlayerEvent

`getPlayer`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PlayerTeleportEvent

public PlayerTeleportEvent(@NotNull @NotNull Player player, @NotNull @NotNull Location from, @Nullable @Nullable Location to)

### PlayerTeleportEvent

public PlayerTeleportEvent(@NotNull @NotNull Player player, @NotNull @NotNull Location from, @Nullable @Nullable Location to, @NotNull @NotNull PlayerTeleportEvent.TeleportCause cause)

## Method Details

### getCause

@NotNull public @NotNull PlayerTeleportEvent.TeleportCause getCause()
Gets the cause of this teleportation event

Returns:
  Cause of the event

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Overrides:
  `getHandlers` in class `PlayerMoveEvent`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()