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;
}

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 ; }
format the string by looking for color - tags and replacing them with the appropriate colour codes as described in the class javadoc
