@Contract("_ -> this")
    default @NotNull Builder times(final int times) {
      return this.condition((index, replaced) -> replaced < times ? PatternReplacementResult.REPLACE : PatternReplacementResult.STOP);
    }
Only replace the first {@code times} matches of the pattern.

@param times maximum amount of matches to process
@return this builder
@since 4.2.0
api/src/main/java/net/kyori/adventure/text/TextReplacementConfig.java