/** * Sets the current part back to normal settings. Only text is kept. * * @return this ComponentBuilder for chaining */ public ComponentBuilder reset() { return retain( FormatRetention.NONE ); }
/** * Sets the current part back to normal settings. Only text is kept. * * @return this ComponentBuilder for chaining */ public ComponentBuilder reset() { return retain( FormatRetention.NONE ); }
/** * Appends the text to the builder and makes it the current target for * formatting. You can specify the amount of formatting retained. * * @param text the text to append * @param retention the formatting to retain * @return this ComponentBuilder for chaining */ public ComponentBuilder append(String text, FormatRetention retention) { parts.add( current ); current = new TextComponent( current ); current.setText( text ); retain( retention ); return this; }