From e4602f027e5bf16e5aa46a2adb3c3afb8a8f57a2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 16 Nov 2013 11:11:43 +1100 Subject: [PATCH] Don't pointlessly create new gson instances --- proxy/src/main/java/net/md_5/bungee/Util.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/Util.java b/proxy/src/main/java/net/md_5/bungee/Util.java index 85b7c1ff..15027826 100644 --- a/proxy/src/main/java/net/md_5/bungee/Util.java +++ b/proxy/src/main/java/net/md_5/bungee/Util.java @@ -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 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)