📚 Update changelog

Also minor codestyle fixes
This commit is contained in:
jmp 2020-11-30 16:41:06 -08:00 • committed by Alexander Söderberg
parent 5b610df013
commit 544c344f18
3 changed files with 8 additions and 10 deletions

View file

@ -25,7 +25,6 @@ package cloud.commandframework.minecraft.extras;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.TextReplacementConfig;
import net.kyori.adventure.text.format.TextColor;
import org.checkerframework.checker.nullness.qual.NonNull;
@ -42,12 +41,10 @@ final class ComponentHelper {
final @NonNull Component component,
final @NonNull TextColor highlightColor
) {
return component.replaceText(
TextReplacementConfig.builder()
.match(SPECIAL_CHARACTERS_PATTERN)
.replacement(match -> match.color(highlightColor))
.build()
);
return component.replaceText(config -> {
config.match(SPECIAL_CHARACTERS_PATTERN);
config.replacement(match -> match.color(highlightColor));
});
}
public static @NonNull Component repeat(