Interface InlineMatcher

All Known Subinterfaces:
ContinuousMatcher, RegexMatcher
All Known Implementing Classes:
RegexMatcher.ChatStandard, RegexMatcher.Simple, RegexMatcher.Standard

public interface InlineMatcher
Matches patterns in any rendered text.

Matchers can replace portions of the input text with some InlineMatch in order to insert text or attach some arbitrary InlineData. Most matchers can and should be made using one of the RegexMatchers but the raw matcher interface is available here in case it's needed.

Matchers are *generally* client-sided. In order for a Matcher to work against arbitrary rendered text it should be registered using InlineClientAPI.addMatcher(com.samsthenerd.inline.api.matching.InlineMatcher).

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.util.Identifier
    Get the ID for this matcher
    Get info about this matcher.
    void
    match(MatchContext matchContext)
    Matches some input text.
  • Method Details

    • match

      void match(MatchContext matchContext)
      Matches some input text. See MatchContext for more information on how to add the matches.
      Parameters:
      matchContext -
    • getInfo

      MatcherInfo getInfo()
      Get info about this matcher.
      Returns:
      matcher's info.
    • getId

      net.minecraft.util.Identifier getId()
      Get the ID for this matcher
      Returns:
      matcher's ID