Class EntityTeleportEvent

java.lang.Object
net.minestom.server.event.entity.EntityTeleportEvent
All Implemented Interfaces:
Event, EntityEvent

public class EntityTeleportEvent extends Object implements EntityEvent
Called with Entity.teleport(Pos) and its overloads.
  • Constructor Details

  • Method Details

    • getEntity

      public Entity getEntity()
      Description copied from interface: EntityEvent
      Gets the entity of this event.
      Specified by:
      getEntity in interface EntityEvent
      Returns:
      The Entity that teleported.
    • getNewPosition

      public Pos getNewPosition()
      Gets the absolute position that the Entity is about to teleport to.
      Returns:
      the absolute teleport position
    • getTeleportPosition

      public Pos getTeleportPosition()
      Gets the raw position that the Entity is about to teleport to, which may be (partially) relative depending on the flags.
      Returns:
      the raw teleport position
    • getRelativeFlags

      @MagicConstant(flagsFromClass=RelativeFlags.class) public int 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