Class UUIDTagType
java.lang.Object
com.github.stefvanschie.inventoryframework.util.UUIDTagType
- All Implemented Interfaces:
PersistentDataType<byte[],UUID>
A
PersistentDataType implementation that adds support for UUIDs.- Since:
- 0.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.persistence.PersistentDataType
PersistentDataType.BooleanPersistentDataType, PersistentDataType.PrimitivePersistentDataType<T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UUIDTagTypeThe one and only instance of this class.Fields inherited from interface org.bukkit.persistence.PersistentDataType
BOOLEAN, BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER, TAG_CONTAINER_ARRAY -
Method Summary
Modifier and TypeMethodDescription@NotNull UUIDfromPrimitive(@org.jetbrains.annotations.NotNull byte[] primitive, @NotNull PersistentDataAdapterContext context) @NotNull Class<byte[]>@org.jetbrains.annotations.NotNull byte[]toPrimitive(@NotNull UUID complex, @NotNull PersistentDataAdapterContext context)
-
Field Details
-
INSTANCE
The one and only instance of this class. Since this class stores no state information (apart from this field), the usage of a single instance is safe even across multiple threads.
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveTypein interfacePersistentDataType<byte[],UUID>
-
getComplexType
- Specified by:
getComplexTypein interfacePersistentDataType<byte[],UUID>
-
toPrimitive
@NotNull public @org.jetbrains.annotations.NotNull byte[] toPrimitive(@NotNull @NotNull UUID complex, @NotNull @NotNull PersistentDataAdapterContext context) - Specified by:
toPrimitivein interfacePersistentDataType<byte[],UUID>
-
fromPrimitive
@NotNull public @NotNull UUID fromPrimitive(@NotNull @org.jetbrains.annotations.NotNull byte[] primitive, @NotNull @NotNull PersistentDataAdapterContext context) - Specified by:
fromPrimitivein interfacePersistentDataType<byte[],UUID>
-