@@ -0,0 +1,2234 @@
+package fr.aumgn.bukkitutils.gconf.typeadapter;%0A%0Aimport java.io.IOException;%0Aimport java.lang.reflect.Type;%0Aimport java.util.HashMap;%0Aimport java.util.LinkedHashMap;%0Aimport java.util.Map;%0A%0Aimport org.bukkit.configuration.serialization.ConfigurationSerializable;%0Aimport org.bukkit.configuration.serialization.ConfigurationSerialization;%0A%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.TypeAdapter;%0Aimport com.google.gson.TypeAdapterFactory;%0Aimport com.google.gson.reflect.TypeToken;%0Aimport com.google.gson.stream.JsonReader;%0Aimport com.google.gson.stream.JsonWriter;%0A%0A@SuppressWarnings(%22unchecked%22)%0Apublic class BukkitConfigTypeAdapterFactory implements TypeAdapterFactory %7B%0A%0A    public static class BukkitConfigTypeAdapter%3CT%3E extends TypeAdapter%3CT%3E %7B%0A%0A        private static final String SERIALIZED_TYPE_KEY = %22$$%22;%0A        private static final Type BUKKIT_SERIAL_TYPE =%0A                new TypeToken%3CHashMap%3CString, String%3E%3E() %7B%7D.getType();%0A%0A        private final Gson gson;%0A%0A        public BukkitConfigTypeAdapter(Gson gson) %7B%0A            this.gson = gson;%0A        %7D%0A%0A        @Override%0A        public T read(JsonReader reader) throws IOException %7B%0A            Map%3CString, Object%3E map = gson.fromJson(%0A                    reader, BUKKIT_SERIAL_TYPE);%0A            map.put(ConfigurationSerialization.SERIALIZED_TYPE_KEY,%0A                    map.remove(SERIALIZED_TYPE_KEY));%0A%0A            return (T) ConfigurationSerialization.deserializeObject(map);%0A        %7D%0A%0A        @Override%0A        public void write(JsonWriter writer, T obj) throws IOException %7B%0A            Map%3CString, Object%3E map = new LinkedHashMap%3CString, Object%3E();%0A            ConfigurationSerializable serializable = (ConfigurationSerializable) obj;%0A            map.put(SERIALIZED_TYPE_KEY,%0A                    ConfigurationSerialization.getAlias(serializable.getClass()));%0A            map.putAll(serializable.serialize());%0A%0A            gson.toJson(map, BUKKIT_SERIAL_TYPE, writer);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public %3CT%3E TypeAdapter%3CT%3E create(Gson gson, TypeToken%3CT%3E token) %7B%0A        if (!ConfigurationSerializable.class.isAssignableFrom(token.getRawType())) %7B%0A            return null;%0A        %7D%0A%0A        return new BukkitConfigTypeAdapter%3CT%3E(gson);%0A    %7D%0A%0A%7D%0A

Add BukkitConfigTypeAdapterFactory