mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-06 20:38:08 +02:00
Fix Enums.findFuzzyByValue() not handling _ correctly.
This commit is contained in:
parent
bd2a8daad3
commit
6d5d9934cc
@ -70,7 +70,7 @@ public static <T extends Enum<T>> T findFuzzyByValue(Class<T> enumType, String..
|
|||||||
for (String test : values) {
|
for (String test : values) {
|
||||||
test = test.replace("_", "");
|
test = test.replace("_", "");
|
||||||
for (T value : enumType.getEnumConstants()) {
|
for (T value : enumType.getEnumConstants()) {
|
||||||
if (value.name().equalsIgnoreCase(test.replace("_", ""))) {
|
if (value.name().replace("_", "").equalsIgnoreCase(test)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user