Don't pointlessly create new gson instances
This commit is contained in:
parent
2f2406206e
commit
e4602f027e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user