java.lang.Object
net.kyori.adventure.text.minimessage.internal.parser.node.TagPart
All Implemented Interfaces:
Tag.Argument

public final class TagPart extends Object implements Tag.Argument
Represents an inner part of a tag.
Since:
4.10.0
  • Constructor Details

    • TagPart

      public TagPart(String sourceMessage, Token token, TokenParser.TagProvider tagResolver)
      Constructs a new tag part.
      Parameters:
      sourceMessage - the source message
      token - the token that creates this tag part
      tagResolver - the combined tag resolver
      Since:
      4.10.0
  • Method Details

    • value

      public String value()
      Returns the value of this tag part.
      Specified by:
      value in interface Tag.Argument
      Returns:
      the value
      Since:
      4.10.0
    • token

      public Token token()
      Returns the token that created this tag part.
      Returns:
      the token
      Since:
      4.10.0
    • unquoteAndEscape

      public static String unquoteAndEscape(String text, int start, int end)
      Removes leading/trailing quotes from the given string, if necessary, and removes escaping '\' characters.
      Parameters:
      text - the input text
      start - the starting index of the substring
      end - the ending index of the substring
      Returns:
      the output substring
      Since:
      4.10.0
    • toString

      public String toString()
      Overrides:
      toString in class Object