public class PlayerTeleportEvent extends PlayerEvent implements Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerTeleportEvent.Cause
Determines what caused the teleportation
|
| Constructor and Description |
|---|
PlayerTeleportEvent(Player player,
Vector3f targetPosition,
PlayerTeleportEvent.Cause cause) |
| Modifier and Type | Method and Description |
|---|---|
PlayerTeleportEvent.Cause |
getCause()
Gets the "cause", i.e. the reason why this player was teleported.
|
Vector3f |
getTargetPosition()
Gets the new position of the player.
|
boolean |
isCancelled()
Determines if the event is cancelled.
|
void |
setCancelled(boolean cancel)
Cancels this event.
|
void |
setTargetPosition(float x,
float y,
float z) |
void |
setTargetPosition(Vector3f position) |
getPlayerpublic PlayerTeleportEvent(Player player, Vector3f targetPosition, PlayerTeleportEvent.Cause cause)
public void setTargetPosition(Vector3f position)
public void setTargetPosition(float x,
float y,
float z)
public Vector3f getTargetPosition()
public PlayerTeleportEvent.Cause getCause()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - set to true if you want to cancel this event.