diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index 525ca209..ff621c7a 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -146,7 +146,7 @@ public void write(HOutput output) throws IOException { private static final String[] EMPTY_ARRAY = new String[0]; private static final String SOCKET_HOST = "127.0.0.1"; - private static final int SOCKET_PORT = 87564; + private static final int SOCKET_PORT = 32148; private static final String MAGICAL_INTEL_OPTION = "-XX:HeapDumpPath=ThisTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump"; private static final boolean isUsingWrapper = true; @SuppressWarnings("unused") @@ -310,7 +310,7 @@ public static Process launch( clientHDir.write(output); } } - } catch (IOException e) { + } catch (Exception e) { LogHelper.error(e); try (HOutput output = new HOutput(IOHelper.newOutput(paramsFile))) { params.write(output); diff --git a/Launcher/src/main/java/ru/gravit/launcher/server/ServerWrapper.java b/Launcher/src/main/java/ru/gravit/launcher/server/ServerWrapper.java index dd7ccd6a..7dfc733b 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/server/ServerWrapper.java +++ b/Launcher/src/main/java/ru/gravit/launcher/server/ServerWrapper.java @@ -36,7 +36,7 @@ public static void main(String[] args) throws Throwable { modulesManager.autoload(Paths.get("modules")); Launcher.modulesManager = modulesManager; LauncherConfig cfg = new LauncherConfig(new HInput(IOHelper.newInput(IOHelper.getResourceURL(Launcher.CONFIG_FILE)))); - configFile = IOHelper.WORKING_DIR.resolve("ServerWrapper.cfg"); + configFile = Paths.get("ServerWrapper.cfg"); modulesManager.preInitModules(); generateConfigIfNotExists(); try (BufferedReader reader = IOHelper.newReader(configFile)) { @@ -73,7 +73,7 @@ private static void generateConfigIfNotExists() throws IOException { return; // Create new config - LogHelper.info("Creating LaunchServer config"); + LogHelper.info("Creating LaunchWrapper config"); Config newConfig; try (BufferedReader reader = IOHelper.newReader(IOHelper.getResourceURL("ru/gravit/launcher/server/config.cfg"))) { newConfig = new Config(TextConfigReader.read(reader, false)); @@ -82,7 +82,7 @@ private static void generateConfigIfNotExists() throws IOException { LogHelper.warning("Title is not set. Please show ServerWrapper.cfg"); // Write LaunchServer config - LogHelper.info("Writing LaunchServer config file"); + LogHelper.info("Writing LaunchWrapper config file"); try (BufferedWriter writer = IOHelper.newWriter(configFile)) { TextConfigWriter.write(newConfig.block, writer, true); }