Class LongDataField

java.lang.Object
com.palmergames.bukkit.towny.object.metadata.CustomDataField<Long>
com.palmergames.bukkit.towny.object.metadata.LongDataField
All Implemented Interfaces:
Cloneable

public class LongDataField extends CustomDataField<Long>
  • Constructor Details

    • LongDataField

      public LongDataField(String key, Long value)
    • LongDataField

      public LongDataField(String key, Long value, String label)
    • LongDataField

      public LongDataField(String key)
  • 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<Long>
      Returns:
      type id of the given CustomDataField class.
    • typeID

      public static String typeID()
    • 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<Long>
      Parameters:
      strValue - input.
    • canParseFromString

      public boolean canParseFromString(String str)
      Description copied from class: CustomDataField
      Determines whether the given input can be parsed to the appropriate value. Used to parse admin input for in-game metadata editing.
      Overrides:
      canParseFromString in class CustomDataField<Long>
      Parameters:
      str - admin input
      Returns:
      whether the string can be parsed or not
    • displayFormattedValue

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

      public CustomDataField<Long> clone()
      Specified by:
      clone in class CustomDataField<Long>