@@ -74,10 +74,10 @@ private static void parsePart(String part, StringBuilder builder) {
7474 continue ;
7575 }
7676 if (isFormat (ChatColor .getByChar (cc .charAt (0 )))) {
77- colorBuilder .append (ChatColor .COLOR_CHAR + cc );
77+ colorBuilder .append (ChatColor .COLOR_CHAR ). append ( cc );
7878 }
7979 }
80- builder .append (color + colorBuilder . toString () );
80+ builder .append (color ). append ( colorBuilder );
8181 } else {
8282 colors = parseColours (colorCharacter , builder , colors );
8383 }
@@ -100,7 +100,7 @@ private static String parseColours(char colorCharacter, StringBuilder builder, S
100100 else if (colorCharacter == 'Q' ) colors = colors .replace (ChatColor .ITALIC .toString (), "" );
101101 else if (colorCharacter == 'M' ) colors = colors .replace (ChatColor .STRIKETHROUGH .toString (), "" );
102102 else if (colorCharacter == 'W' ) colors = colors .replace (ChatColor .MAGIC .toString (), "" );
103- if (Character .isUpperCase (colorCharacter )) builder .append (ChatColor .RESET + colors );
103+ if (Character .isUpperCase (colorCharacter )) builder .append (ChatColor .RESET ). append ( colors );
104104 return colors ;
105105 }
106106
@@ -115,7 +115,7 @@ private static String replaceWith(String message, String quot, String pre, Strin
115115 public static List <String > getMatches (String string , String regex ) {
116116 Pattern pattern = Pattern .compile (regex );
117117 Matcher matcher = pattern .matcher (string );
118- List <String > matches = new ArrayList <String >();
118+ List <String > matches = new ArrayList <>();
119119 while (matcher .find ()) {
120120 matches .add (matcher .group (1 ));
121121 }
@@ -138,7 +138,7 @@ private static String getLastColors(String input) {
138138 ChatColor color = ChatColor .getByChar (c );
139139
140140 if (color != null ) {
141- result = color . toString () + result ;
141+ result = color + result ;
142142
143143 // Once we find a color or reset we can stop searching
144144 if (!isFormat (color ) || color .equals (ChatColor .RESET )) {
0 commit comments