MCPcopy Create free account
hub / github.com/TheCyaniteProject/exit_code_java / preStartupCheck

Method preStartupCheck

src/main/java/exitcode/Main.java:307–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305 }
306
307 public static void preStartupCheck() {
308 File configFile = new File("./config.xml");
309 if (!configFile.isFile()) {
310 Logger.warn("Config file does not exist! Creating one.");
311 try {
312 PrintWriter out = new PrintWriter("./config.xml");
313 out.printf(
314 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>%n%n" +
315 "<data>%n" +
316 " <systemdata>%n" +
317 " <showwarning>true</showwarning>%n" +
318 " </systemdata>%n" +
319 "</data>");
320 out.close();
321 } catch (Exception e) {
322 Logger.error(e.getMessage());
323 }
324 Logger.message("Showing Early-Access Warning");
325 StartupWarning.start();
326 } else {
327 if (ExitParser.getSettingValue_system("showwarning").equals("true")) {
328 Logger.message("Showing Early-Access Warning");
329 StartupWarning.start();
330 }
331 }
332 }
333}
334
335class StartupWarning {

Callers 1

mainMenuMethod · 0.95

Calls 5

warnMethod · 0.95
errorMethod · 0.95
messageMethod · 0.95
startMethod · 0.95

Tested by

no test coverage detected