Class LocationDataField
java.lang.Object
com.palmergames.bukkit.towny.object.metadata.CustomDataField<org.bukkit.Location>
com.palmergames.bukkit.towny.object.metadata.LocationDataField
- All Implemented Interfaces:
Cloneable
- Since:
- 0.98.4.4
- Author:
- LlmDL
-
Field Summary
Fields inherited from class com.palmergames.bukkit.towny.object.metadata.CustomDataField
label
-
Constructor Summary
ConstructorDescriptionLocationDataField
(String key) LocationDataField
(String key, org.bukkit.Location location) LocationDataField
(String key, org.bukkit.Location location, String label) -
Method Summary
Modifier and TypeMethodDescription@NotNull CustomDataField
<org.bukkit.Location> clone()
protected String
Formats and colors the value of the custom data field object.Gets the type id for the given CustomDataField class.protected String
Serializes the current value to a string.void
setValueFromString
(String strValue) Sets the value based on the given input.static String
typeID()
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
-
LocationDataField
-
LocationDataField
-
LocationDataField
-
-
Method Details
-
getTypeID
Description copied from class:CustomDataField
Gets 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:
getTypeID
in classCustomDataField<org.bukkit.Location>
- Returns:
- type id of the given CustomDataField class.
-
typeID
-
serializeValueToString
Description copied from class:CustomDataField
Serializes the current value to a string. Used for saving the CustomDataField object.- Overrides:
serializeValueToString
in classCustomDataField<org.bukkit.Location>
- Returns:
- serialized string
-
setValueFromString
Description copied from class:CustomDataField
Sets the value based on the given input. Used when admins want to edit metadata in-game.- Specified by:
setValueFromString
in classCustomDataField<org.bukkit.Location>
- Parameters:
strValue
- input.
-
displayFormattedValue
Description copied from class:CustomDataField
Formats and colors the value of the custom data field object.- Specified by:
displayFormattedValue
in classCustomDataField<org.bukkit.Location>
- Returns:
- the formatted value of this data field.
-
clone
- Specified by:
clone
in classCustomDataField<org.bukkit.Location>
-