public class PlayerTeleportEvent extends Object implements PlayerEvent, Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerTeleportEvent.TeleportCause |
| Constructor and Description |
|---|
PlayerTeleportEvent(Player player,
Location from,
Location to,
PlayerTeleportEvent.TeleportCause cause) |
| Modifier and Type | Method and Description |
|---|---|
PlayerTeleportEvent.TeleportCause |
getCause() |
Location |
getFrom() |
Player |
getPlayer()
Get the player in question.
|
Location |
getTo() |
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
void |
setCause(PlayerTeleportEvent.TeleportCause cause) |
void |
setTo(Location to) |
public PlayerTeleportEvent(Player player, Location from, Location to, PlayerTeleportEvent.TeleportCause cause)
public Location getFrom()
public Location getTo()
public PlayerTeleportEvent.TeleportCause getCause()
public void setCause(PlayerTeleportEvent.TeleportCause cause)
public void setTo(Location to)
public Player getPlayer()
PlayerEventgetPlayer in interface PlayerEventpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true to cancel the event.Copyright © 2017–2019 NukkitX. All rights reserved.