Package io.papermc.paper.entity
Enum Class EntitySerializationFlag
- All Implemented Interfaces:
Serializable
,Comparable<EntitySerializationFlag>
,Constable
Represents flags for entity serialization.
- Since:
- 1.21.4
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionSerialize entities that wouldn't be serialized normally (e.g.Serialize misc non-saveable entities like lighting bolts, fishing bobbers, etc.Include passengers in the serialized data.Allow serializingPlayer
s. -
Method Summary
Modifier and TypeMethodDescriptionstatic EntitySerializationFlag
Returns the enum constant of this class with the specified name.static EntitySerializationFlag[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORCE
Serialize entities that wouldn't be serialized normally (e.g. dead, despawned, non-persistent, etc.).- See Also:
-
MISC
Serialize misc non-saveable entities like lighting bolts, fishing bobbers, etc.
Note: players require a separate flag:PLAYER
. -
PASSENGERS
Include passengers in the serialized data. -
PLAYER
Allow serializingPlayer
s.Note: deserializing player data will always fail.
-
-
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
-