Class ByteDataField

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

public class ByteDataField extends CustomDataField<Byte>
  • Constructor Details Link icon

    • ByteDataField Link icon

      public ByteDataField(String key)
    • ByteDataField Link icon

      public ByteDataField(String key, byte value, String label)
    • ByteDataField Link icon

      public ByteDataField(String key, byte value)
  • Method Details Link icon

    • getTypeID Link icon

      @NotNull public @NotNull 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<Byte>
      Returns:
      type id of the given CustomDataField class.
    • typeID Link icon

      public static String typeID()
    • setValueFromString Link icon

      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<Byte>
      Parameters:
      strValue - input.
    • canParseFromString Link icon

      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<Byte>
      Parameters:
      str - admin input
      Returns:
      whether the string can be parsed or not
    • displayFormattedValue Link icon

      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<Byte>
      Returns:
      the formatted value of this data field.
    • clone Link icon

      @NotNull public @NotNull CustomDataField<Byte> clone()
      Specified by:
      clone in class CustomDataField<Byte>