mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 11:55:52 -04:00
修正地址解析问题
This commit is contained in:
parent
5bb53622ca
commit
6db34fcdc7
@ -112,14 +112,16 @@ public class DynamicDownloadProvider extends MojangDownloadProvider {
|
||||
|
||||
@Override
|
||||
public String getParsedDownloadURL(String str) {
|
||||
if (StrUtils.isNotBlank(librariesAddr)) {
|
||||
str = str.replace("https://libraries.minecraft.net", librariesAddr);
|
||||
}
|
||||
if (StrUtils.isNotBlank(launcherMetaAddr)) {
|
||||
str = str.replace("https://launchermeta.mojang.com", launcherMetaAddr);
|
||||
}
|
||||
if (StrUtils.isNotBlank(launcherAddr)) {
|
||||
str = str.replace("https://launcher.mojang.com", launcherAddr);
|
||||
if (str != null) {
|
||||
if (StrUtils.isNotBlank(librariesAddr)) {
|
||||
str = str.replace("https://libraries.minecraft.net", librariesAddr);
|
||||
}
|
||||
if (StrUtils.isNotBlank(launcherMetaAddr)) {
|
||||
str = str.replace("https://launchermeta.mojang.com", launcherMetaAddr);
|
||||
}
|
||||
if (StrUtils.isNotBlank(launcherAddr)) {
|
||||
str = str.replace("https://launcher.mojang.com", launcherAddr);
|
||||
}
|
||||
}
|
||||
return super.getParsedDownloadURL(str);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user