Enum Class TeleportFlag.Relative

java.lang.Object
java.lang.Enum<TeleportFlag.Relative>
io.papermc.paper.entity.TeleportFlag.Relative
All Implemented Interfaces:
TeleportFlag, Serializable, Comparable<TeleportFlag.Relative>, Constable
Enclosing interface:
TeleportFlag

public static enum TeleportFlag.Relative extends Enum<TeleportFlag.Relative> implements TeleportFlag
Note: These flags only work on Player entities.

Relative flags enable a player to not lose their velocity in the flag-specific axis/context when teleporting.

See Also:
API Note:
The relative flags exposed in the API do *not* mirror all flags known to vanilla, as relative flags concerning the position are non-applicable given teleports always expect an absolute location.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>

    Nested classes/interfaces inherited from interface io.papermc.paper.entity.TeleportFlag

    TeleportFlag.EntityState, TeleportFlag.Relative
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Configures the player to not lose velocity in their current rotation during the teleport.
    Configures the player to not lose velocity in their x axis during the teleport.
    Configures the player to not lose velocity in their y axis during the teleport.
    Configures the player to not lose velocity in their z axis during the teleport.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    relative velocity flags now allow for the whole rotation to be relative, instead of the yaw and pitch having individual options.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related ones.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related ones.
    Deprecated, for removal: This API element is subject to removal in a future version.
    relative velocity flags now allow for the whole rotation to be relative, instead of the yaw and pitch having individual options.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related ones.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • VELOCITY_X

      public static final TeleportFlag.Relative VELOCITY_X
      Configures the player to not lose velocity in their x axis during the teleport.
    • VELOCITY_Y

      public static final TeleportFlag.Relative VELOCITY_Y
      Configures the player to not lose velocity in their y axis during the teleport.
    • VELOCITY_Z

      public static final TeleportFlag.Relative VELOCITY_Z
      Configures the player to not lose velocity in their z axis during the teleport.
    • VELOCITY_ROTATION

      public static final TeleportFlag.Relative VELOCITY_ROTATION
      Configures the player to not lose velocity in their current rotation during the teleport.
  • Field Details

    • X

      @Deprecated(since="1.21.3", forRemoval=true) public static final TeleportFlag.Relative X
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related ones. As the API does not deal with position relative flags, this name is no longer applicable. Use VELOCITY_X instead.
      Configures the player to not loose velocity in their x axis during the teleport.
    • Y

      @Deprecated(since="1.21.3", forRemoval=true) public static final TeleportFlag.Relative Y
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related ones. As the API does not deal with position relative flags, this name is no longer applicable. Use VELOCITY_Y instead.
      Configures the player to not loose velocity in their y axis during the teleport.
    • Z

      @Deprecated(since="1.21.3", forRemoval=true) public static final TeleportFlag.Relative Z
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 1.21.3, vanilla split up the relative teleport flags into velocity and position related ones. As the API does not deal with position relative flags, this name is no longer applicable. Use VELOCITY_Z instead.
      Configures the player to not loose velocity in their z axis during the teleport.
    • YAW

      @Deprecated(since="1.21.3", forRemoval=true) public static final TeleportFlag.Relative YAW
      Deprecated, for removal: This API element is subject to removal in a future version.
      relative velocity flags now allow for the whole rotation to be relative, instead of the yaw and pitch having individual options. Use VELOCITY_ROTATION instead.
      Represents the player's yaw
    • PITCH

      @Deprecated(since="1.21.3", forRemoval=true) public static final TeleportFlag.Relative PITCH
      Deprecated, for removal: This API element is subject to removal in a future version.
      relative velocity flags now allow for the whole rotation to be relative, instead of the yaw and pitch having individual options. Use VELOCITY_ROTATION instead.
      Represents the player's pitch
  • Method Details

    • values

      public static TeleportFlag.Relative[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TeleportFlag.Relative valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null