Class TagPart
java.lang.Object
net.kyori.adventure.text.minimessage.internal.parser.node.TagPart
- All Implemented Interfaces:
Tag.Argument
Represents an inner part of a tag.
- Since:
- 4.10.0
-
Constructor Summary
ConstructorsConstructorDescriptionTagPart(String sourceMessage, Token token, TokenParser.TagProvider tagResolver) Constructs a new tag part. -
Method Summary
Modifier and TypeMethodDescriptiontoken()Returns the token that created this tag part.toString()static StringunquoteAndEscape(String text, int start, int end) Removes leading/trailing quotes from the given string, if necessary, and removes escaping'\'characters.value()Returns the value of this tag part.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.text.minimessage.tag.Tag.Argument
asDouble, asInt, isFalse, isTrue, lowerValue
-
Constructor Details
-
TagPart
Constructs a new tag part.- Parameters:
sourceMessage- the source messagetoken- the token that creates this tag parttagResolver- the combined tag resolver- Since:
- 4.10.0
-
-
Method Details
-
value
Returns the value of this tag part.- Specified by:
valuein interfaceTag.Argument- Returns:
- the value
- Since:
- 4.10.0
-
token
Returns the token that created this tag part.- Returns:
- the token
- Since:
- 4.10.0
-
unquoteAndEscape
Removes leading/trailing quotes from the given string, if necessary, and removes escaping'\'characters.- Parameters:
text- the input textstart- the starting index of the substringend- the ending index of the substring- Returns:
- the output substring
- Since:
- 4.10.0
-
toString
-