/** * Sets whether the current part is italic. * * @param italic whether this part is italic * @return this ComponentBuilder for chaining */ public ComponentBuilder italic(boolean italic) { current.setItalic( italic ); return this; }
component.setItalic( object.get( "italic" ).getAsBoolean() );
/** * Retains only the specified formatting. * * @param retention the formatting to retain */ public void retain(FormatRetention retention) { if ( retention == FormatRetention.FORMATTING || retention == FormatRetention.NONE ) { setClickEvent( null ); setHoverEvent( null ); } if ( retention == FormatRetention.EVENTS || retention == FormatRetention.NONE ) { setColor( null ); setBold( null ); setItalic( null ); setUnderlined( null ); setStrikethrough( null ); setObfuscated( null ); setInsertion( null ); } }
setItalic( component.isItalicRaw() );
component.setItalic( object.get( "italic" ).getAsBoolean() );
BaseComponent(BaseComponent old) { setColor( old.getColorRaw() ); setBold( old.isBoldRaw() ); setItalic( old.isItalicRaw() ); setUnderlined( old.isUnderlinedRaw() ); setStrikethrough( old.isStrikethroughRaw() ); setObfuscated( old.isObfuscatedRaw() ); setInsertion( old.getInsertion() ); setClickEvent( old.getClickEvent() ); setHoverEvent( old.getHoverEvent() ); if ( old.getExtra() != null ) { for ( BaseComponent component : old.getExtra() ) { addExtra( component.duplicate() ); } } }