Skip to content

Commit

Permalink
Serialization hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubix327 committed Aug 27, 2023
1 parent e11def7 commit 7fb1439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mineacademy/fo/SerializeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7fb1439

Please sign in to comment.