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 RegexMatcher
s 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)
.
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.Identifier
getId()
Get the ID for this matchergetInfo()
Get info about this matcher.void
match
(MatchContext matchContext) Matches some input text.
-
Method Details
-
match
Matches some input text. SeeMatchContext
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
-