Class TagNode
java.lang.Object
net.kyori.adventure.text.minimessage.internal.parser.node.ElementNode
net.kyori.adventure.text.minimessage.internal.parser.node.TagNode
- All Implemented Interfaces:
Node
Node that represents a tag.
- Since:
- 4.10.0
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTagNode(ElementNode parent, Token token, String sourceMessage, TokenParser.TagProvider tagProvider) Creates a new element node. -
Method Summary
Modifier and TypeMethodDescriptionbuildToString(StringBuilder sb, int indent) Serializes this node to a string.name()Returns the name of this tag.parts()Returns the parts of this tag.tag()Gets the tag attached to this tag node.voidSets the tag logic that is represented by this tag node.token()Returns the token that lead to the creation of this token.Methods inherited from class net.kyori.adventure.text.minimessage.internal.parser.node.ElementNode
addChild, children, parent, sourceMessage, toString, unsafeChildren
-
Constructor Details
-
TagNode
public TagNode(ElementNode parent, Token token, String sourceMessage, TokenParser.TagProvider tagProvider) Creates a new element node.- Parameters:
parent- the parent of this nodetoken- the token that created this nodesourceMessage- the source messagetagProvider- the tag provider- Since:
- 4.10.0
-
-
Method Details
-
parts
Returns the parts of this tag.- Returns:
- the parts
- Since:
- 4.10.0
-
name
Returns the name of this tag.- Returns:
- the name
- Since:
- 4.10.0
-
token
Description copied from class:ElementNodeReturns the token that lead to the creation of this token.- Overrides:
tokenin classElementNode- Returns:
- the token
-
tag
Gets the tag attached to this tag node.- Returns:
- the tag for this tag node
- Since:
- 4.10.0
-
tag
Sets the tag logic that is represented by this tag node.- Parameters:
tag- the tag logic- Since:
- 4.10.0
-
buildToString
Description copied from class:ElementNodeSerializes this node to a string.- Overrides:
buildToStringin classElementNode- Parameters:
sb- the string builder to serialize intoindent- the current indent level- Returns:
- the passed string builder, for chaining
-