Interface Attributes


public interface Attributes
Attribute name constants
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    If item tooltips use advanced tooltips.
    static final String
    Button action, executed when a TagNames.BUTTON button element is clicked.
    static final String
    Class list attribute.
    static final String
    Enabled/disabled state attribute, used by <button> elements.
    static final String
    ID attribute.
    static final String
    Item tooltip hide state attribute, used by <item> elements to determine whether the item tooltip should be hidden or not.
    static final String
    Option name attribute, used during parsing by the <option> element.
    static final String
    Source attribute, used by <script>, <style> and <item> elements.
    static final String
    Inline style attribute.
    static final String
    Key attribute, used during parsing by the <option> element.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static boolean
    boolAttribute(@Nullable String value, boolean fallback)
     
    floatAttribute(String value, float min, float max)
    Parses a float attribute value.
  • Field Details

  • Method Details

    • floatAttribute

      static Result<Float,String> floatAttribute(String value, float min, float max)
      Parses a float attribute value.

      If the specified value cannot be parsed into a float, an erroneous result with the error "Invalid number" is returned.

      If the number is parsed successfully, then it is clamped according to the min and max parameters.

      Parameters:
      value - Value to parse from
      min - Minimum value
      max - Maximum value
      Returns:
      Parsed float result
    • boolAttribute

      static boolean boolAttribute(@Nullable @Nullable String value, boolean fallback)