mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 11:45:31 +01:00
Enables mixed case enums to still be read from yaml config files
https://github.com/BentoBoxWorld/addon-challenges/issues/33
This commit is contained in:
parent
76483f7e39
commit
e23818f73d
@ -522,7 +522,7 @@ public class YamlDatabaseHandler<T> extends AbstractDatabaseHandler<T> {
|
||||
// Find out the value
|
||||
Class<Enum> enumClass = (Class<Enum>)clazz;
|
||||
try {
|
||||
value = Enum.valueOf(enumClass, (String)value);
|
||||
value = Enum.valueOf(enumClass, ((String)value).toUpperCase());
|
||||
} catch (Exception e) {
|
||||
// This value does not exist - probably admin typed it wrongly
|
||||
// Show what is available and pick one at random
|
||||
|
Loading…
Reference in New Issue
Block a user