Class ConfigurationSerializableDataType<T extends ConfigurationSerializable>
java.lang.Object
com.jeff_media.morepersistentdatatypes.datatypes.serializable.ConfigurationSerializableDataType<T>
- Type Parameters:
T
- The type of theConfigurationSerializable
- All Implemented Interfaces:
PersistentDataType<byte[],
T>
public class ConfigurationSerializableDataType<T extends ConfigurationSerializable>
extends Object
implements PersistentDataType<byte[],T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType
PersistentDataType.PrimitivePersistentDataType<T extends Object>
-
Field Summary
Fields inherited from interface org.bukkit.persistence.PersistentDataType
BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER, TAG_CONTAINER_ARRAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromPrimitive
(byte[] bytes, PersistentDataAdapterContext persistentDataAdapterContext) Class<byte[]>
byte[]
toPrimitive
(T serializable, PersistentDataAdapterContext persistentDataAdapterContext)
-
Constructor Details
-
ConfigurationSerializableDataType
Creates a newConfigurationSerializableDataType
for the given type- Parameters:
type
- The type of theConfigurationSerializable
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveType
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable>
-
getComplexType
- Specified by:
getComplexType
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable>
-
toPrimitive
@NotNull public byte[] toPrimitive(@NotNull T serializable, @NotNull PersistentDataAdapterContext persistentDataAdapterContext) - Specified by:
toPrimitive
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable>
-
fromPrimitive
@NotNull public T fromPrimitive(@NotNull byte[] bytes, @NotNull PersistentDataAdapterContext persistentDataAdapterContext) - Specified by:
fromPrimitive
in interfacePersistentDataType<byte[],
T extends ConfigurationSerializable>
-