Class StringArrayDataType
java.lang.Object
com.jeff_media.morepersistentdatatypes.datatypes.StringArrayDataType
- All Implemented Interfaces:
PersistentDataType<byte[],
String[]>
A
PersistentDataType
for String
arrays-
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
ConstructorDescriptionStringArrayDataType
(Charset charset) Creates a newStringArrayDataType
with the given charset -
Method Summary
Modifier and TypeMethodDescriptionString[]
fromPrimitive
(byte[] bytes, PersistentDataAdapterContext itemTagAdapterContext) Class<byte[]>
byte[]
toPrimitive
(String[] strings, PersistentDataAdapterContext context)
-
Constructor Details
-
StringArrayDataType
Creates a newStringArrayDataType
with the given charset- Parameters:
charset
- The charset to use
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveType
in interfacePersistentDataType<byte[],
String[]>
-
getComplexType
- Specified by:
getComplexType
in interfacePersistentDataType<byte[],
String[]>
-
toPrimitive
- Specified by:
toPrimitive
in interfacePersistentDataType<byte[],
String[]>
-
fromPrimitive
@NotNull public String[] fromPrimitive(@NotNull byte[] bytes, @NotNull PersistentDataAdapterContext itemTagAdapterContext) - Specified by:
fromPrimitive
in interfacePersistentDataType<byte[],
String[]>
-