Don't pointlessly create new gson instances

This commit is contained in:
md_5 2013-11-16 11:11:43 +11:00
parent 2f2406206e
commit e4602f027e

View File

@ -69,11 +69,6 @@ public class Util
return Joiner.on( separators ).join( objects );
}
public static void main(String[] args)
{
System.out.println( stupify( "§5H§6E§7L" ) );
}
public static String stupify(String text)
{
List<JsonObject> sections = new ArrayList<>();
@ -95,7 +90,7 @@ public class Util
}
sections.add( generateAndReset( currentChar, buffer ) );
return new Gson().toJson( sections );
return BungeeCord.getInstance().gson.toJson( sections );
}
private static JsonObject generateAndReset(char currentChar, StringBuilder buffer)