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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the entity of this event.Gets the absolute position that theEntityis about to teleport to.intReturns the flags that determine which fields of the position are relative.Gets the raw position that theEntityis about to teleport to, which may be (partially) relative depending on the flags.
-
Constructor Details
-
EntityTeleportEvent
public EntityTeleportEvent(Entity entity, Pos teleportPosition, @MagicConstant(flagsFromClass=RelativeFlags.class) int relativeFlags)
-
-
Method Details
-
getEntity
Description copied from interface:EntityEventGets the entity of this event.- Specified by:
getEntityin interfaceEntityEvent- Returns:
- The
Entitythat teleported.
-
getNewPosition
-
getTeleportPosition
-
getRelativeFlags
Returns the flags that determine which fields of the position are relative.- Returns:
- the flags that determine which fields of the position are relative
-