@@ -0,0 +1,1820 @@
+package fr.aumgn.bukkitutils.gson.typeadapter;%0A%0Aimport java.io.IOException;%0Aimport java.util.Locale;%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.JsonToken;%0Aimport com.google.gson.stream.JsonWriter;%0A%0Aimport fr.aumgn.bukkitutils.gson.GsonLoadRuntimeException;%0A%0Apublic class EnumTypeAdapterFactory implements TypeAdapterFactory %7B%0A%0A    public static class EnumTypeAdapter%3CT extends Enum%3CT%3E%3E extends TypeAdapter%3CT%3E %7B%0A%0A        private final Class%3CT%3E enumClass;%0A%0A        public EnumTypeAdapter(Class%3CT%3E enumClass) %7B%0A            this.enumClass = enumClass;%0A        %7D%0A%0A        @Override%0A        public T read(JsonReader reader) throws IOException %7B%0A            if (reader.peek() == JsonToken.NULL) %7B%0A                return null;%0A            %7D%0A%0A            String name = reader.nextString().toLowerCase(Locale.US);%0A            for (T element : enumClass.getEnumConstants()) %7B%0A                if (element.name().toLowerCase(Locale.US).equals(name)) %7B%0A                    return element;%0A                %7D%0A            %7D%0A%0A            throw new GsonLoadRuntimeException(%22Unknown value : %22 + name);%0A        %7D%0A%0A        @Override%0A        public void write(JsonWriter writer, T value) throws IOException %7B%0A            if (value == null) %7B%0A                writer.nullValue();%0A            %7D else %7B%0A                writer.value(value.name());%0A            %7D%0A        %7D%0A    %7D%0A%0A    @SuppressWarnings(%7B%22rawtypes%22, %22unchecked%22%7D)%0A    @Override%0A    public %3CT%3E TypeAdapter%3CT%3E create(Gson gson, TypeToken%3CT%3E token) %7B%0A        if (!token.getRawType().isEnum()) %7B%0A            return null;%0A        %7D%0A%0A        return new EnumTypeAdapter((Class%3CT%3E) token.getRawType());%0A    %7D%0A%7D%0A

Add a custom EnumTypeAdapterFactory compatible with MCPC+ Material Hack