/** * Returns string contains given components as legacy text. (without events etc, but with colors) * * @param components components to convert to legacy text. * @return string contains given components as legacy text. (without events etc, but with colors) */ public static String toLegacyText(final BaseComponent... components) { final StringBuilder builder = new StringBuilder(); for (final BaseComponent msg : components) { builder.append(msg.toLegacyText()); } return builder.toString(); }
void toLegacyText(final StringBuilder builder) { if (this.extra != null) { for (final BaseComponent e : this.extra) { e.toLegacyText(builder); } } }