Package net.minestom.server.event.entity
Class EntityTeleportEvent
java.lang.Object
net.minestom.server.event.entity.EntityTeleportEvent
- All Implemented Interfaces:
Event
,EntityEvent
Called with
Entity.teleport(Pos)
and its overloads.-
Constructor Details
-
EntityTeleportEvent
public EntityTeleportEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull Pos teleportPosition, @MagicConstant(flagsFromClass=RelativeFlags.class) int relativeFlags)
-
-
Method Details
-
getEntity
Description copied from interface:EntityEvent
Gets the entity of this event.- Specified by:
getEntity
in interfaceEntityEvent
- Returns:
- The
Entity
that teleported.
-
getNewPosition
- Returns:
- The position that the
Entity
is about to teleport to. This is an absolute position.
-
getTeleportPosition
- Returns:
- The position that the
Entity
is about to teleport to. This may be (partially) relative depending on the flags.
-
getRelativeFlags
- Returns:
- The flags that determine which fields of the position are relative.
-