From 64571818ccf85a20d62d56493703fb2a8c84a37a Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 6 Jan 2016 19:33:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E7=B1=BB?= =?UTF-8?q?=E5=90=8D...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../java/cn/citycraft/GsonAgent/GsonAgent.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/citycraft/GsonAgent/GsonAgent.java b/src/main/java/cn/citycraft/GsonAgent/GsonAgent.java index 4f35833..8140079 100644 --- a/src/main/java/cn/citycraft/GsonAgent/GsonAgent.java +++ b/src/main/java/cn/citycraft/GsonAgent/GsonAgent.java @@ -21,14 +21,14 @@ import cn.citycraft.GsonAgent.api.utils.Utils; * @since 2016年1月5日 下午12:51:30 * @author 喵♂呜,曲尘 */ -@SuppressWarnings({ "unchecked", "rawtypes" }) +@SuppressWarnings({ "unchecked", "rawtypes", "unused" }) public class GsonAgent { public static boolean newVersion = false; private static String internalPackageName; private static Class TypeAdapter; static { - internalPackageName = "cn.citycraft.PluginHelper.gsonagent."; + internalPackageName = "cn.citycraft.GsonAgent."; try { Thread.currentThread().getContextClassLoader().loadClass("com.google.gson.Gson"); newVersion = true; @@ -39,7 +39,6 @@ public class GsonAgent { try { TypeAdapter = getInternalClass("bind.TypeAdapter"); } catch (final Exception e) { - e.printStackTrace(); } } @@ -132,4 +131,14 @@ public class GsonAgent { private static Class getInternalClass(final String className) throws ClassNotFoundException { return Class.forName(internalPackageName + className + "Handle"); } + + private void none() { + Class clazz; + clazz = cn.citycraft.GsonAgent.api.bind.TypeAdapter.class; + clazz = cn.citycraft.GsonAgent.nms.bind.TypeAdapterHandle.class; + clazz = cn.citycraft.GsonAgent.normal.bind.TypeAdapterHandle.class; + clazz = cn.citycraft.GsonAgent.api.bind.TypeAdapterFactory.class; + clazz = cn.citycraft.GsonAgent.nms.bind.TypeAdapterFactoryHandle.class; + clazz = cn.citycraft.GsonAgent.normal.bind.TypeAdapterFactoryHandle.class; + } }