Package net.kyori.adventure.text
Interface TextReplacementConfig.Condition
- Enclosing interface:
- TextReplacementConfig
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function determining whether a certain match should be replaced.
- Since:
- 4.8.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull PatternReplacementResult
shouldReplace
(@NotNull MatchResult result, int matchCount, int replaced) Determine how a single match should be handled.
-
Method Details
-
shouldReplace
@NotNull @NotNull PatternReplacementResult shouldReplace(@NotNull @NotNull MatchResult result, int matchCount, int replaced) Determine how a single match should be handled.- Parameters:
result
- the current match resultmatchCount
- the number of matches encountered, including this one and matches that were not replacedreplaced
- the number of matches that have already been replaced- Returns:
- whether a certain match should
- Since:
- 4.8.0
-