Merge pull request #6 from MelonCode/master

Added option to specify JRE executable file
This commit is contained in:
Pierce 2019-04-01 20:18:16 -04:00 committed by GitHub
commit d523d6563c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -40,6 +40,7 @@ launcher.authenticator.getAuth("email", "password").then(auth => {
| `options.clientPackage` | String | Path to the client package zip file. | False |
| `options.root` | String | Path where you want the launcher to work in. like `C:/Users/user/AppData/Roaming/.mc` | True |
| `options.os` | String | windows, osx or linux | True |
| `options.javaPath` | String | Path to the JRE executable file, will default to `java` if not entered. | 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.memory.max` | String | Max amount of memory being used by Minectaft | True |

View file

@ -61,7 +61,7 @@ module.exports = async function (options) {
const launchArguments = args.concat(jvm, classPaths, launchOptions);
const minecraft = child.spawn(`java`, launchArguments);
const minecraft = child.spawn(options.javaPath ? options.javaPath : 'java', launchArguments);
event.emit('start', null);
minecraft.stdout.on('data', (data) => event.emit('data', data));
minecraft.stderr.on('data', (data) => event.emit('error', data));