question: public static String format ( String s ) { List < String > color_repl = new ArrayList < > ( ) ; Matcher m = colorPattern . matcher ( s ) ; while ( m . find ( ) ) color_repl . add ( m . group ( 1 ) ) ; String [ ] split = s . split ( colorPattern . pattern ( ) ) ; String total = "" ; for ( int i = 0 ; i < split . length ; i ++ ) { if ( i >= color_repl . size ( ) ) total += split [ i ] ; else { total += colorize ( split [ i ] , Colors . get ( color_repl . get ( i ) ) ) ; } } return total ; }
target:  Format the string by looking for Color-Tags and replacing them with the appropriate colour codes as described in the class javadoc