List of usage examples for org.apache.commons.lang3.text StrBuilder setNewLineText
public StrBuilder setNewLineText(final String newLine)
From source file:com.relicum.ipsum.Utils.StringStyles.java
/** * Boxed announcement./* w ww . j a v a 2s. c o m*/ * * @param color the color * @param color2 the color 2 * @param style the style * @param character the character * @param hColor the h color * @param hStyle the h style * @param heading the heading * @param messages the messages * @return the string */ public static String boxedAnnouncement(final ChatColor color, final ChatColor color2, final ChatColor style, char character, final ChatColor hColor, ChatColor hStyle, String heading, String... messages) { StrBuilder sb = new StrBuilder(); sb.setNewLineText("\n"); sb.append(" ").appendNewLine().append(" ").appendNewLine().append(" ").appendNewLine(); sb.append(fullLine(color, color2, style, character)).appendNewLine(); sb.append(" ").appendNewLine(); sb.append(centeredHeading(hColor, hStyle, heading)).appendNewLine(); sb.append(" ").appendNewLine(); sb.append(ChatColor.translateAlternateColorCodes('&', messages[0])).appendNewLine(); sb.append(" ").appendNewLine(); sb.append(fullLine(color2, color, style, character)).appendNewLine(); return sb.toString(); }