Package net.arcadiusmc.dom
Interface Attributes
public interface Attributes
Attribute name constants
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIf item tooltips use advanced tooltips.static final StringButton action, executed when aTagNames.BUTTONbutton element is clicked.static final StringClass list attribute.static final StringEnabled/disabled state attribute, used by<button>elements.static final StringID attribute.static final StringItem tooltip hide state attribute, used by<item>elements to determine whether the item tooltip should be hidden or not.static final StringOption name attribute, used during parsing by the<option>element.static final StringSource attribute, used by<script>,<style>and<item>elements.static final StringInline style attribute.static final StringKey attribute, used during parsing by the<option>element. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic booleanboolAttribute(@Nullable String value, boolean fallback) floatAttribute(String value, float min, float max) Parses a float attribute value.
-
Field Details
-
ID
ID attribute.- See Also:
-
CLASS
Class list attribute.- See Also:
-
STYLE
Inline style attribute.- See Also:
-
SOURCE
Source attribute, used by<script>,<style>and<item>elements.- See Also:
-
NAME
Option name attribute, used during parsing by the<option>element.- See Also:
-
VALUE
Key attribute, used during parsing by the<option>element.- See Also:
-
ENABLED
Enabled/disabled state attribute, used by<button>elements.- See Also:
-
ITEM_TOOLTIP_HIDE
Item tooltip hide state attribute, used by<item>elements to determine whether the item tooltip should be hidden or not.- See Also:
-
ADVANCED_ITEM_TOOLTIPS
If item tooltips use advanced tooltips. (Including theF3+Hdebug information).This attribute overrides the
Options.ADVANCED_ITEM_TOOLTIPSoption, if it is set.- See Also:
-
BUTTON_ACTION
Button action, executed when aTagNames.BUTTONbutton element is clicked. Only works on button elements.
Valid value patterns Pattern Description Example closeCloses the page "close"cmd: <command>Runs a command as console. You can use %player%as a placeholder for the player's name"cmd: msg %player% Hello, world!player-cmd: <command>Runs a command as the player. You can use %player%as a placeholder for the player's name"player-cmd: msg %player% Hello, me!- See Also:
-
-
Method Details
-
floatAttribute
Parses a float attribute value.If the specified
valuecannot 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
minandmaxparameters.- Parameters:
value- Value to parse frommin- Minimum valuemax- Maximum value- Returns:
- Parsed float result
-
boolAttribute
-