diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index f71727ed..dc483640 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -738,11 +738,21 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException { newConfig.setLegacyAddress("localhost"); newConfig.setProjectName("test"); } else { - System.out.println("LaunchServer address: "); + System.out.println("LaunchServer legacy address(default: localhost): "); newConfig.setLegacyAddress(commandHandler.readLine()); System.out.println("LaunchServer projectName: "); newConfig.setProjectName(commandHandler.readLine()); } + if(newConfig.legacyAddress == null) + { + LogHelper.error("Legacy address null. Using localhost"); + newConfig.legacyAddress = "localhost"; + } + if(newConfig.projectName == null) + { + LogHelper.error("ProjectName null. Using MineCraft"); + newConfig.projectName = "MineCraft"; + } // Write LaunchServer config LogHelper.info("Writing LaunchServer config file");