public class TextUtils
extends java.lang.Object
| Constructor and Description |
|---|
TextUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ATextComponent |
makeURLsClickable(ATextComponent component)
Make URLs in the given text component clickable.
|
static ATextComponent |
replace(ATextComponent component,
java.lang.String searchRegex,
java.util.function.Function<ATextComponent,ATextComponent> replaceFunction)
Replace all matches of the given pattern in this component and all siblings.
|
public static ATextComponent makeURLsClickable(ATextComponent component)
component - The component to make clickablepublic static ATextComponent replace(ATextComponent component, java.lang.String searchRegex, java.util.function.Function<ATextComponent,ATextComponent> replaceFunction)
StringComponent components.component - The component to replace insearchRegex - The regex to search forreplaceFunction - The function that will be called for every match