mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-11 18:27:32 +00:00
enum fix in configs
This commit is contained in:
1 file changed
+1
-1
@@ -118,7 +118,7 @@ public class ConfigurationManager {
|
||||
.map(ConfigurationManager::extractValue)
|
||||
.orElse(field.get(null));
|
||||
val possibleValues = enumValues.stream().map(Enum::name).toArray(String[]::new);
|
||||
field.set(null, fieldClass.getDeclaredField(rawConfig.getString(name, category, defaultValue.name(), comment, possibleValues, langKey)));
|
||||
field.set(null, fieldClass.getDeclaredField(rawConfig.getString(name, category, defaultValue.name(), comment, possibleValues, langKey)).get(null));
|
||||
} else {
|
||||
throw new ConfigException("Illegal config field: " + field.getName() + " in " + configClass.getName() + ": Unsupported type " + fieldClass.getName() + "! Did you forget an @Ignore annotation?");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user