diff --git a/src/main/java/net/wurstclient/util/DefaultAutoBuildTemplates.java b/src/main/java/net/wurstclient/util/DefaultAutoBuildTemplates.java index 06d70206cc..3dc92cf420 100644 --- a/src/main/java/net/wurstclient/util/DefaultAutoBuildTemplates.java +++ b/src/main/java/net/wurstclient/util/DefaultAutoBuildTemplates.java @@ -96,19 +96,23 @@ public static void createFiles(Path folder) { for(DefaultAutoBuildTemplates template : DefaultAutoBuildTemplates .values()) + createFile(folder, template); + } + + private static void createFile(Path folder, + DefaultAutoBuildTemplates template) + { + JsonObject json = toJson(template); + Path path = folder.resolve(template.name + ".json"); + + try { - JsonObject json = toJson(template); - Path path = folder.resolve(template.name + ".json"); + JsonUtils.toJson(json, path); - try - { - JsonUtils.toJson(json, path); - - }catch(IOException | JsonException e) - { - System.out.println("Couldn't save " + path.getFileName()); - e.printStackTrace(); - } + }catch(IOException | JsonException e) + { + System.out.println("Couldn't save " + path.getFileName()); + e.printStackTrace(); } }