Enum Class TeleportFlag.EntityState

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

@Deprecated(since="1.21.10", forRemoval=true) public static enum TeleportFlag.EntityState extends Enum<TeleportFlag.EntityState> implements TeleportFlag
Deprecated, for removal: This API element is subject to removal in a future version.
As of 1.21.10, the default behavior for teleportation is now aligned with vanilla behavior. This means all of these flags are functionally done by default.
Represents flags that effect the entity's state on teleportation.
  • Enum Constant Details

    • RETAIN_PASSENGERS

      @Deprecated(since="1.21.10", forRemoval=true) public static final TeleportFlag.EntityState RETAIN_PASSENGERS
      Deprecated, for removal: This API element is subject to removal in a future version.
      This is now default behavior in teleportation. If you want to dismount all passengers, remove them with Entity.removePassenger(Entity).
      If all passengers should not be required to be removed prior to teleportation.

      Note: Teleporting to a different world with this flag present while the entity has entities riding it will cause this teleportation to return false and not occur.

    • RETAIN_VEHICLE

      @Deprecated(since="1.21.10", forRemoval=true) public static final TeleportFlag.EntityState RETAIN_VEHICLE
      Deprecated, for removal: This API element is subject to removal in a future version.
      This behavior was highly technical and is not replicatable due to client limitations, and has not functioned for many updates.
      If the entity should not be dismounted if they are riding another entity.

      Note: Teleporting to a different world with this flag present while this entity is riding another entity will cause this teleportation to return false and not occur.

    • RETAIN_OPEN_INVENTORY

      @Deprecated(since="1.21.10", forRemoval=true) public static final TeleportFlag.EntityState RETAIN_OPEN_INVENTORY
      Deprecated, for removal: This API element is subject to removal in a future version.
      No longer done on teleportation, use HumanEntity.closeInventory() to do this yourself.
      Indicates that a player should not have their current open inventory closed when teleporting.

      Note: This option will be ignored when teleported to a different world.

  • Method Details

    • values

      public static TeleportFlag.EntityState[] values()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.EntityState valueOf(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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