Change type of downloadType to string

This commit is contained in:
yushijinhun
2018-09-15 23:05:37 +08:00
parent 1753b4d27e
commit 9950bef260
14 changed files with 73 additions and 78 deletions

View File

@@ -28,11 +28,6 @@ import org.jackhuang.hmcl.download.optifine.OptiFineBMCLVersionList;
*/
public class BMCLAPIDownloadProvider implements DownloadProvider {
public static final BMCLAPIDownloadProvider INSTANCE = new BMCLAPIDownloadProvider();
private BMCLAPIDownloadProvider() {
}
@Override
public String getVersionListURL() {
return "https://bmclapi2.bangbang93.com/mc/game/version_manifest.json";

View File

@@ -1,27 +0,0 @@
/*
* Hello Minecraft! Launcher.
* Copyright (C) 2018 huangyuhui <huanghongxun2008@126.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
package org.jackhuang.hmcl.download;
public class CurseCDNDownloadProvider extends MojangDownloadProvider {
public static final CurseCDNDownloadProvider INSTANCE = new CurseCDNDownloadProvider();
@Override
public String injectURL(String baseURL) {
return baseURL == null ? null : baseURL.replaceFirst("https?://files\\.minecraftforge\\.net/maven", "https://ftb.cursecdn.com/FTB2/maven");
}
}

View File

@@ -23,7 +23,7 @@ import org.jackhuang.hmcl.download.liteloader.LiteLoaderVersionList;
import org.jackhuang.hmcl.download.optifine.OptiFineBMCLVersionList;
/**
* @see <a href="http://wiki.vg">http://wiki,vg</a>
* @see <a href="http://wiki.vg">http://wiki.vg</a>
* @author huangyuhui
*/
public class MojangDownloadProvider implements DownloadProvider {
@@ -56,6 +56,6 @@ public class MojangDownloadProvider implements DownloadProvider {
@Override
public String injectURL(String baseURL) {
return baseURL;
return baseURL;
}
}