diff --git a/core/src/mindustry/Vars.java b/core/src/mindustry/Vars.java index 2cfa4bad45..80e6241e09 100644 --- a/core/src/mindustry/Vars.java +++ b/core/src/mindustry/Vars.java @@ -54,8 +54,10 @@ public class Vars implements Loadable{ public static final String crashReportURL = "http://192.99.169.18/report"; /** URL the links to the wiki's modding guide.*/ public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/"; - /** URL to the JSON file containing all the global, public servers. */ + /** URL to the JSON file containing all the global, public servers. Not queried in BE. */ public static final String serverJsonURL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers.json"; + /** URL to the JSON file containing all the BE servers. Only queried in BE. */ + public static final String serverJsonBeURL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers_be.json"; /** URL the links to the wiki's modding guide.*/ public static final String reportIssueURL = "https://github.com/Anuken/Mindustry/issues/new?template=bug_report.md"; /** list of built-in servers.*/ diff --git a/core/src/mindustry/net/BeControl.java b/core/src/mindustry/net/BeControl.java index d81c5e721d..4de581108f 100644 --- a/core/src/mindustry/net/BeControl.java +++ b/core/src/mindustry/net/BeControl.java @@ -117,6 +117,7 @@ public class BeControl{ Log.info("&lcAuto-downloading next version..."); try{ + //download new file from github Fi source = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); Fi dest = source.sibling("server-be-" + updateBuild + ".jar"); @@ -126,6 +127,7 @@ public class BeControl{ () -> false, () -> { Log.info("&lcVersion downloaded, exiting. Note that if you are not using the run-server script, the server will not restart automatically."); + //replace old file with new dest.copyTo(source); dest.delete(); System.exit(2); //this will cause a restart if using the script @@ -136,7 +138,6 @@ public class BeControl{ } } checkUpdates = false; - //todo server updates } } diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index 4c8ae3cc58..8984939bcf 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/mindustry/ui/dialogs/JoinDialog.java @@ -362,7 +362,7 @@ public class JoinDialog extends FloatingDialog{ servers = Core.settings.getObject("server-list", Array.class, Array::new); //get servers - Core.net.httpGet(serverJsonURL, result -> { + Core.net.httpGet(becontrol.active() ? serverJsonBeURL : serverJsonURL, result -> { try{ Jval val = Jval.read(result.getResultAsString()); Core.app.post(() -> { diff --git a/servers_be.json b/servers_be.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/servers_be.json @@ -0,0 +1 @@ +[] \ No newline at end of file