Class InlineMatch.TextMatch

java.lang.Object
com.samsthenerd.inline.api.matching.InlineMatch.TextMatch
All Implemented Interfaces:
InlineMatch
Enclosing interface:
InlineMatch

public static class InlineMatch.TextMatch extends Object implements InlineMatch
A match representing some text.
  • Constructor Details

    • TextMatch

      public TextMatch(net.minecraft.text.Text text)
      Makes a TextMatch with the given text
      Parameters:
      text -
  • Method Details

    • accept

      public int accept(net.minecraft.text.CharacterVisitor visitor, int index, net.minecraft.text.Style currentStyle)
      Description copied from interface: InlineMatch
      Supplies styled characters
      Specified by:
      accept in interface InlineMatch
      Parameters:
      visitor - accepts the styled characters
      index - the number of characters given to this visitor so far
      currentStyle - the style that this text would otherwise have.
      Returns:
      the number of characters supplied to the visitor.
    • charLength

      public int charLength()
      Description copied from interface: InlineMatch
      Gets the length of this match
      Specified by:
      charLength in interface InlineMatch
      Returns:
      the number of characters we plan to give the visitor.