Class UUIDTagType
java.lang.Object
com.github.stefvanschie.inventoryframework.util.UUIDTagType
- All Implemented Interfaces:
org.bukkit.persistence.PersistentDataType<byte[],UUID>
public final class UUIDTagType
extends Object
implements org.bukkit.persistence.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
org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType<T extends Object> -
Field Summary
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescription@NotNull UUIDfromPrimitive(@org.jetbrains.annotations.NotNull byte[] primitive, @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)@NotNull Class<byte[]>@org.jetbrains.annotations.NotNull byte[]toPrimitive(@NotNull UUID complex, @NotNull org.bukkit.persistence.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 interfaceorg.bukkit.persistence.PersistentDataType<byte[],UUID>
-
getComplexType
- Specified by:
getComplexTypein interfaceorg.bukkit.persistence.PersistentDataType<byte[],UUID>
-
toPrimitive
@NotNull public @org.jetbrains.annotations.NotNull byte[] toPrimitive(@NotNull @NotNull UUID complex, @NotNull @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)- Specified by:
toPrimitivein interfaceorg.bukkit.persistence.PersistentDataType<byte[],UUID>
-
fromPrimitive
@NotNull public @NotNull UUID fromPrimitive(@NotNull @org.jetbrains.annotations.NotNull byte[] primitive, @NotNull @NotNull org.bukkit.persistence.PersistentDataAdapterContext context)- Specified by:
fromPrimitivein interfaceorg.bukkit.persistence.PersistentDataType<byte[],UUID>
-