Package io.papermc.paper.entity
Enum Class 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 ConstantDescriptionConfigures 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
Modifier and TypeFieldDescriptionstatic final TeleportFlag.Relative
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.static final TeleportFlag.Relative
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.static final TeleportFlag.Relative
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.static final TeleportFlag.Relative
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.static final TeleportFlag.Relative
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 TypeMethodDescriptionstatic TeleportFlag.Relative
Returns the enum constant of this class with the specified name.static TeleportFlag.Relative[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VELOCITY_X
Configures the player to not lose velocity in their x axis during the teleport. -
VELOCITY_Y
Configures the player to not lose velocity in their y axis during the teleport. -
VELOCITY_Z
Configures the player to not lose velocity in their z axis during the teleport. -
VELOCITY_ROTATION
Configures the player to not lose velocity in their current rotation during the teleport.
-
-
Field Details
-
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. UseVELOCITY_X
instead.Configures the player to not loose velocity in their x axis during the teleport. -
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. UseVELOCITY_Y
instead.Configures the player to not loose velocity in their y axis during the teleport. -
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. UseVELOCITY_Z
instead.Configures the player to not loose velocity in their z axis during the teleport. -
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. UseVELOCITY_ROTATION
instead.Represents the player's yaw -
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. UseVELOCITY_ROTATION
instead.Represents the player's pitch
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-