Log # of fetched servers; cleanup

This commit is contained in:
Anuken
2019-11-22 16:13:09 -05:00
parent c324dce034
commit f28eb4027c
2 changed files with 5 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ public class Vars implements Loadable{
/** 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.*/
public static final Array<String> defaultServers = Array.with(/*"mins.us.to"*/);
public static final Array<String> defaultServers = Array.with();
/** maximum distance between mine and core that supports automatic transferring */
public static final float mineTransferRange = 220f;
/** team of the player by default */

View File

@@ -369,14 +369,11 @@ public class JoinDialog extends FloatingDialog{
try{
defaultServers.clear();
val.asArray().each(child -> defaultServers.add(child.getString("address", "<invalid>")));
}catch(Throwable t){
t.printStackTrace();
}
Log.info("Fetched {0} global servers.", defaultServers.size);
}catch(Throwable ignored){}
});
}catch(Throwable t){
t.printStackTrace();
}
}, Throwable::printStackTrace);
}catch(Throwable ignored){}
}, t -> {});
}
private void saveServers(){