mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-16 10:44:50 +00:00
put update chatification code in public library, plus misc cleanup
This commit is contained in:
5 files changed
+49
-31
No files matched your search
@@ -32,11 +32,11 @@ public class CommonProxy {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(LibraryConfig.class);
|
||||
} catch (ConfigException ex) {
|
||||
FalsePatternLib.getLog().error("Failed to register " + Tags.MODNAME + " config!", ex);
|
||||
FalsePatternLib.getLog().error("Failed to register config!", ex);
|
||||
}
|
||||
if (LibraryConfig.ENABLE_UPDATE_CHECKER) {
|
||||
FalsePatternLib.getLog().info("Launching asynchronous update check.");
|
||||
val updateCheckFuture = UpdateChecker.fetchUpdatesAsync("https://falsepattern.com/mc/versions.json");
|
||||
val updateCheckFuture = UpdateChecker.fetchUpdatesAsync(FalsePatternLib.UPDATE_URL);
|
||||
updatesFuture = Async.asyncWorker.submit(new Callable<List<ModUpdateInfo>>() {
|
||||
@Override
|
||||
public List<ModUpdateInfo> call() {
|
||||
@@ -56,9 +56,9 @@ public class CommonProxy {
|
||||
update.log(FalsePatternLib.getLog());
|
||||
}
|
||||
} else if (updates == null) {
|
||||
FalsePatternLib.getLog().warn("Unknown error while checking updates");
|
||||
FalsePatternLib.getLog().warn("Unknown error while checking updates.");
|
||||
} else {
|
||||
FalsePatternLib.getLog().info("All FalsePattern mods up to date!");
|
||||
FalsePatternLib.getLog().info("All checked mods up to date!");
|
||||
updates = null;
|
||||
}
|
||||
return updates;
|
||||
|
||||
Reference in new issue
Block a user