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

public class LocationDataField extends CustomDataField<org.bukkit.Location>
Since:
0.98.4.4
Author:
LlmDL
  • Constructor Details

    • LocationDataField

      public LocationDataField(String key)
    • LocationDataField

      public LocationDataField(String key, org.bukkit.Location location)
    • LocationDataField

      public LocationDataField(String key, org.bukkit.Location location, String label)
  • Method Details

    • getTypeID

      public String 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 class CustomDataField<org.bukkit.Location>
      Returns:
      type id of the given CustomDataField class.
    • typeID

      public static String typeID()
    • serializeValueToString

      protected String serializeValueToString()
      Description copied from class: CustomDataField
      Serializes the current value to a string. Used for saving the CustomDataField object.
      Overrides:
      serializeValueToString in class CustomDataField<org.bukkit.Location>
      Returns:
      serialized string
    • setValueFromString

      public void setValueFromString(String strValue)
      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 class CustomDataField<org.bukkit.Location>
      Parameters:
      strValue - input.
    • displayFormattedValue

      protected String displayFormattedValue()
      Description copied from class: CustomDataField
      Formats and colors the value of the custom data field object.
      Specified by:
      displayFormattedValue in class CustomDataField<org.bukkit.Location>
      Returns:
      the formatted value of this data field.
    • clone

      @NotNull public @NotNull CustomDataField<org.bukkit.Location> clone()
      Specified by:
      clone in class CustomDataField<org.bukkit.Location>