(String name)
| 360 | } |
| 361 | |
| 362 | private static void downloadUpdate(String name) { |
| 363 | try { |
| 364 | String path = "http://5zig.net/api/lang?version=" + Version.LANGVERSION + "&name=" + name; |
| 365 | File dest = new File(The5zigMod.getModDirectory(), "lang/" + Version.LANGVERSION + "/" + name); |
| 366 | The5zigMod.logger.info("Found an Update for Language File {}. Downloading from {} to {}", name, path, dest); |
| 367 | FileUtils.downloadToFile(path, dest); |
| 368 | if (currentLanguage.equals(deserialize(name.substring(0, name.length() - END.length())))) |
| 369 | loadPropertyBundle(); |
| 370 | } catch (IOException e) { |
| 371 | The5zigMod.logger.error("Could not download File " + name + "!", e); |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | private static class LanguageJSON { |
| 376 |
no test coverage detected