refactors and updates

This commit is contained in:
Pierce 2019-06-22 22:54:27 -04:00
parent e5e1d68883
commit d521ecee31
3 changed files with 5 additions and 6 deletions

View file

@ -36,8 +36,8 @@ const launcher = new Client();
launcher.launch(opts); launcher.launch(opts);
launcher.on('debug', (e) => console.log(e)); launcher.on('debug', (e) => console.log(e));
launcher.on('data', (e) => console.log(e)); launcher.on('data', (e) => console.log(e.toString('utf-8')));
launcher.on('error', (e) => console.log(e)); launcher.on('error', (e) => console.log(e.toString('utf-8')));
``` ```
### Documentation ### 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.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.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.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.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.memory.min` | String | Min amount of memory being used by Minectaft. | True |
| `options.forge` | String | Path to Universal Forge Jar. | False | | `options.forge` | String | Path to Universal Forge Jar. | False |

View file

@ -369,9 +369,7 @@ class Handler {
switch(process.platform) { switch(process.platform) {
case "win32": return "windows"; case "win32": return "windows";
case "darwin": return "osx"; case "darwin": return "osx";
case "freebsd": return "linux"; default: return "linux";
case "sunos": return "linux";
default: throw Error("[MCLC Error] Couldn't set OS specific JVM argument!")
} }
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "minecraft-launcher-core", "name": "minecraft-launcher-core",
"version": "3.5.0", "version": "3.5.1",
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS", "description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {