diff --git a/src/main/java/org/mineacademy/fo/SerializeUtil.java b/src/main/java/org/mineacademy/fo/SerializeUtil.java index e355bc64c..f6e3cd203 100644 --- a/src/main/java/org/mineacademy/fo/SerializeUtil.java +++ b/src/main/java/org/mineacademy/fo/SerializeUtil.java @@ -113,7 +113,7 @@ public static Object serialize(Mode mode, Object object) { ConfigSerializable obj = (ConfigSerializable) object; if (obj instanceof AutoSerializable){ - return autoSerialize(obj); + return autoSerialize(obj).serialize(); } // Default serialization and Auto-serialization @@ -353,7 +353,7 @@ public static SerializedMap autoSerialize(Object object){ SerializedMap map = new SerializedMap(); // Get the map from super class if deep=true - if (instance.serializeDeeply() && superCl != ConfigSerializable.class){ + if (instance.serializeDeeply() && superCl != AutoSerializable.class){ // TODO what if the super class does not implement ConfigSerializable? try { map = (SerializedMap) superCl.getDeclaredMethod("serialize").invoke(object);