mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-07-24 13:15:06 +02:00
Fix Converter command
This commit is contained in:
parent
312410c9de
commit
78cecb27d7
|
@ -47,7 +47,7 @@ public class ConverterCommand implements CommandExecutor {
|
|||
return true;
|
||||
}
|
||||
|
||||
ConvertType type = ConvertType.valueOf(args[0]);
|
||||
ConvertType type = ConvertType.fromName(args[0]);
|
||||
if (type == null) {
|
||||
m._(sender, "error");
|
||||
return true;
|
||||
|
@ -111,8 +111,12 @@ public class ConverterCommand implements CommandExecutor {
|
|||
return this.name;
|
||||
}
|
||||
|
||||
ConvertType fromName(String name) {
|
||||
return ConvertType.valueOf(name);
|
||||
public static ConvertType fromName(String name) {
|
||||
for (ConvertType type : ConvertType.values()) {
|
||||
if (type.getName().equalsIgnoreCase(name))
|
||||
return type;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user