mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 04:38:03 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConvertType type = ConvertType.valueOf(args[0]);
|
ConvertType type = ConvertType.fromName(args[0]);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
m._(sender, "error");
|
m._(sender, "error");
|
||||||
return true;
|
return true;
|
||||||
@ -111,8 +111,12 @@ public class ConverterCommand implements CommandExecutor {
|
|||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConvertType fromName(String name) {
|
public static ConvertType fromName(String name) {
|
||||||
return ConvertType.valueOf(name);
|
for (ConvertType type : ConvertType.values()) {
|
||||||
|
if (type.getName().equalsIgnoreCase(name))
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user