From 526742b375dc076b0119af912cc0525c33f15089 Mon Sep 17 00:00:00 2001 From: Gravit Date: Mon, 24 Sep 2018 19:59:42 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=D1=8B=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=80=D0=B0=20=D0=BF=D0=BE=D1=80=D1=82=D0=B0=20?= =?UTF-8?q?=D0=B8=20ServerWrapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/client/ClientLauncher.java | 4 ++-- .../main/java/ru/gravit/launcher/server/ServerWrapper.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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); }