Class ByteDataField
java.lang.Object
com.palmergames.bukkit.towny.object.metadata.CustomDataField<Byte>
com.palmergames.bukkit.towny.object.metadata.ByteDataField
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields inherited from class com.palmergames.bukkit.towny.object.metadata.CustomDataField
label -
Constructor Summary
ConstructorsConstructorDescriptionByteDataField(String key) ByteDataField(String key, byte value) ByteDataField(String key, byte value, String label) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanParseFromString(String str) Determines whether the given input can be parsed to the appropriate value.@NotNull CustomDataField<Byte> clone()Formats and colors the value of the custom data field object.@NotNull StringGets the type id for the given CustomDataField class.voidsetValueFromString(String strValue) Sets the value based on the given input.static StringtypeID()Methods inherited from class com.palmergames.bukkit.towny.object.metadata.CustomDataField
equals, formatValueAsComp, getKey, getLabel, getLabelAsComp, getValue, hashCode, hasLabel, isValidType, serializeValueToString, setLabel, setValue, shouldDisplayInStatus, toString
-
Constructor Details
-
ByteDataField
-
ByteDataField
-
ByteDataField
-
-
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<Byte>- 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<Byte>- Parameters:
strValue- input.
-
canParseFromString
Description copied from class:CustomDataFieldDetermines whether the given input can be parsed to the appropriate value. Used to parse admin input for in-game metadata editing.- Overrides:
canParseFromStringin classCustomDataField<Byte>- Parameters:
str- admin input- Returns:
- whether the string can be parsed or not
-
displayFormattedValue
Description copied from class:CustomDataFieldFormats and colors the value of the custom data field object.- Specified by:
displayFormattedValuein classCustomDataField<Byte>- Returns:
- the formatted value of this data field.
-
clone
- Specified by:
clonein classCustomDataField<Byte>
-