diff --git a/src/main/java/br/com/finalcraft/evernifecore/config/yaml/helper/CfgLoadableSalvable.java b/src/main/java/br/com/finalcraft/evernifecore/config/yaml/helper/CfgLoadableSalvable.java index 19eec77..8289d23 100644 --- a/src/main/java/br/com/finalcraft/evernifecore/config/yaml/helper/CfgLoadableSalvable.java +++ b/src/main/java/br/com/finalcraft/evernifecore/config/yaml/helper/CfgLoadableSalvable.java @@ -86,6 +86,14 @@ public static SmartLoadSave addLoadableSalvable(Class clazz){ smartLoadSave.setOnConfigLoad(onConfigLoadOptional.get()); shouldRegister = true; } + + if (shouldRegister == false){ + if (clazz.isEnum()){ + smartLoadSave.setOnConfigSave((configSection, o) -> configSection.setValue(o.toString())); + smartLoadSave.setOnConfigLoad(configSection -> (O) Enum.valueOf((Class) clazz, configSection.getString(""))); + shouldRegister = true; + } + } }