Фиксы номера порта и ServerWrapper

This commit is contained in:
Gravit 2018-09-24 19:59:42 +07:00
parent 96167e81a3
commit 526742b375
2 changed files with 5 additions and 5 deletions

View file

@ -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);

View file

@ -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);
}