Enum Class PropertyFormat

java.lang.Object
java.lang.Enum<PropertyFormat>
net.darkhax.bookshelf.common.api.text.format.PropertyFormat
All Implemented Interfaces:
Serializable, Comparable<PropertyFormat>, Constable, IPropertyFormat

public enum PropertyFormat extends Enum<PropertyFormat> implements IPropertyFormat
Formats a property string using various separator patterns.
  • Enum Constant Details

    • CENTER

      public static final PropertyFormat CENTER
      Formats a property with the separator aligned in the center. Example: "property : value".
    • LEFT

      public static final PropertyFormat LEFT
      Formats a property with the separator aligned to the left. Example: "property :value".
    • SPACED

      public static final PropertyFormat SPACED
      Formats a property using a single space as the separator. Example: "property value".
    • NONE

      public static final PropertyFormat NONE
      Formats a property without a separator. Example: "propertyvalue".
  • Method Details

    • values

      public static PropertyFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PropertyFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • formatKey

      public net.minecraft.resources.ResourceLocation formatKey()
      Description copied from interface: IPropertyFormat
      A namespaced identifier that is used to derive localization keys for the format.
      Specified by:
      formatKey in interface IPropertyFormat
      Returns:
      The namespace ID for the format.