Strips the given message of all color codes @param input String to strip of color @return A copy of the input string, without any coloring
(@Nullable final String input)
| 330 | * @return A copy of the input string, without any coloring |
| 331 | */ |
| 332 | @Contract("!null -> !null; null -> null") |
| 333 | @Nullable |
| 334 | public static String stripColor(@Nullable final String input) { |
| 335 | if (input == null) { |
| 336 | return null; |
| 337 | } |
| 338 | |
| 339 | return STRIP_COLOR_PATTERN.matcher(input).replaceAll(""); |
| 340 | } |
| 341 | |
| 342 | /** |
| 343 | * Translates a string using an alternate color code character into a |