Class ListDataField
java.lang.Object
com.palmergames.bukkit.towny.object.metadata.CustomDataField<List<CustomDataField<?>>>
com.palmergames.bukkit.towny.object.metadata.ListDataField
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields inherited from class com.palmergames.bukkit.towny.object.metadata.CustomDataField
label -
Constructor Summary
ConstructorsConstructorDescriptionListDataField(String key) ListDataField(String key, List<CustomDataField<?>> value, String label) -
Method Summary
Modifier and TypeMethodDescription@NotNull CustomDataField<List<CustomDataField<?>>> clone()protected StringFormats and colors the value of the custom data field object.@NotNull StringGets the type id for the given CustomDataField class.Serializes the current value to a string.voidsetValueFromString(String strValue) Sets the value based on the given input.static StringtypeID()Methods inherited from class com.palmergames.bukkit.towny.object.metadata.CustomDataField
canParseFromString, equals, formatValueAsComp, getKey, getLabel, getLabelAsComp, getValue, hashCode, hasLabel, isValidType, setLabel, setValue, shouldDisplayInStatus, toString
-
Constructor Details
-
ListDataField
-
ListDataField
-
-
Method Details
-
getTypeID
Description copied from class:CustomDataFieldGets the type id for the given CustomDataField class. This value is attached to the class, and not a specific instance. Used for serialization purposes.- Specified by:
getTypeIDin classCustomDataField<List<CustomDataField<?>>>- Returns:
- type id of the given CustomDataField class.
-
typeID
-
setValueFromString
Description copied from class:CustomDataFieldSets the value based on the given input. Used when admins want to edit metadata in-game.- Specified by:
setValueFromStringin classCustomDataField<List<CustomDataField<?>>>- Parameters:
strValue- input.
-
serializeValueToString
Description copied from class:CustomDataFieldSerializes the current value to a string. Used for saving the CustomDataField object.- Overrides:
serializeValueToStringin classCustomDataField<List<CustomDataField<?>>>- Returns:
- serialized string
-
displayFormattedValue
Description copied from class:CustomDataFieldFormats and colors the value of the custom data field object.- Specified by:
displayFormattedValuein classCustomDataField<List<CustomDataField<?>>>- Returns:
- the formatted value of this data field.
-
clone
- Specified by:
clonein classCustomDataField<List<CustomDataField<?>>>
-