mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[ANY] Update mirror
This commit is contained in:
parent
ba0eca5e1f
commit
07bfd0b340
1 changed files with 13 additions and 1 deletions
|
@ -50,7 +50,7 @@ public final class LaunchServerConfig {
|
|||
|
||||
public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) {
|
||||
LaunchServerConfig newConfig = new LaunchServerConfig();
|
||||
newConfig.mirrors = new String[]{"https://mirror.gravit.pro/new/", "https://gravit-launcher-mirror.storage.googleapis.com/"};
|
||||
newConfig.mirrors = new String[]{"https://mirror.gravit.pro/5.2.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"};
|
||||
newConfig.launch4j = new LaunchServerConfig.ExeConf();
|
||||
newConfig.launch4j.enabled = true;
|
||||
newConfig.launch4j.copyright = "© GravitLauncher Team";
|
||||
|
@ -169,6 +169,18 @@ public void verify() {
|
|||
if (netty == null) {
|
||||
throw new NullPointerException("Netty must not be null");
|
||||
}
|
||||
// Mirror check
|
||||
{
|
||||
boolean updateMirror = Boolean.getBoolean("launchserver.config.disableUpdateMirror");
|
||||
if(!updateMirror) {
|
||||
for(int i=0;i < mirrors.length;++i) {
|
||||
if("https://mirror.gravit.pro/".equals(mirrors[i])) {
|
||||
logger.warn("Replace mirror 'https://mirror.gravit.pro/' to 'https://mirror.gravit.pro/5.2.x/'. If you really need to use original url, use '-Dlaunchserver.config.disableUpdateMirror=true'");
|
||||
mirrors[i] = "https://mirror.gravit.pro/5.2.x/";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void init(LaunchServer.ReloadType type) {
|
||||
|
|
Loading…
Reference in a new issue