Package net.arcadiusmc.dom
Interface Attributes
public interface Attributes
Attribute name constants
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTrigger forBUTTON_ACTION.static final StringIf item tooltips use advanced tooltips.static final StringButton action, executed when aButtonElementbutton element is clicked.static final StringClass list attribute.static final StringName of the linked java class in aJavaObjectElementstatic 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 StringUsed to specify the placeholder on anInputElementstatic final StringSource attribute, used by<script>,<style>and<item>elements.static final StringInline style attribute.static final StringType 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 aButtonElementbutton 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:
-
ACTION_TRIGGER
Trigger forBUTTON_ACTION.Supported values Value Triggers leftWhen button is left-clicked rightWhen button is right-clicked - See Also:
-
CLASS_NAME
Name of the linked java class in aJavaObjectElement- See Also:
-
TYPE
Type attribute.Used in multiple places:
- On
ComponentElements to specify what syntax to use when loading component data. - On
InputElements to specify what type of input they accept
- See Also:
- On
-
PLACEHOLDER
Used to specify the placeholder on anInputElement- 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
-