Add functionality to restore default servers

This commit is contained in:
gsemaj 2021-09-18 20:28:57 -04:00
parent 0cdf3df4d4
commit c2cd2d5cd6

View File

@ -65,6 +65,11 @@ function deleteServer() {
loadServerList(); loadServerList();
} }
function restoreDefaultServers() {
remotefs.copySync(__dirname+"\\defaults\\servers.json", userdir+"\\servers.json");
loadServerList();
}
function loadGameVersions() { function loadGameVersions() {
var versionjson = JSON.parse(remotefs.readFileSync(userdir+"\\versions.json")); var versionjson = JSON.parse(remotefs.readFileSync(userdir+"\\versions.json"));
versionarray = versionjson['versions']; versionarray = versionjson['versions'];