From d521ecee31a52a970e85ae623f134027b99e0de0 Mon Sep 17 00:00:00 2001 From: Pierce Date: Sat, 22 Jun 2019 22:54:27 -0400 Subject: [PATCH] refactors and updates --- README.md | 5 +++-- components/handler.js | 4 +--- package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ed71a8..453d624 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ const launcher = new Client(); launcher.launch(opts); launcher.on('debug', (e) => console.log(e)); -launcher.on('data', (e) => console.log(e)); -launcher.on('error', (e) => console.log(e)); +launcher.on('data', (e) => console.log(e.toString('utf-8'))); +launcher.on('error', (e) => console.log(e.toString('utf-8'))); ``` ### Documentation @@ -56,6 +56,7 @@ launcher.on('error', (e) => console.log(e)); | `options.os` | String | windows, osx or linux. MCLC with auto determine the OS if this field isn't provided. | False | | `options.version.number` | String | Minecraft version that is going to be launched. | True | | `options.version.type` | String | Any string. The actual Minecraft launcher uses `release` and `snapshot`. | True | +| `options.version.custom` | String | The name of the folder, jar file, and version json in the version folder. | True | | `options.memory.max` | String | Max amount of memory being used by Minectaft. | True | | `options.memory.min` | String | Min amount of memory being used by Minectaft. | True | | `options.forge` | String | Path to Universal Forge Jar. | False | diff --git a/components/handler.js b/components/handler.js index c453436..79a1868 100644 --- a/components/handler.js +++ b/components/handler.js @@ -369,9 +369,7 @@ class Handler { switch(process.platform) { case "win32": return "windows"; case "darwin": return "osx"; - case "freebsd": return "linux"; - case "sunos": return "linux"; - default: throw Error("[MCLC Error] Couldn't set OS specific JVM argument!") + default: return "linux"; } } } diff --git a/package.json b/package.json index 2660848..c57b6bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-launcher-core", - "version": "3.5.0", + "version": "3.5.1", "description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS", "main": "index.js", "dependencies": {