diff --git a/README.md b/README.md index 4ec058c..8b63e2f 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ You'll need to provide the folder created in the versions if you're running the #### What should it look like running from console? The `pid` is printed in console after the process is launched. -![gif](https://owo.whats-th.is/8mT5kxc.png/3N3PMC4.gif) +![gif](https://owo.whats-th.is/3N3PMC4.gif) ## Contributors These are the people that helped out that aren't listed [here](https://github.com/Pierce01/MinecraftLauncher-core/graphs/contributors)! diff --git a/components/launcher.js b/components/launcher.js index ebcfc88..ff96293 100644 --- a/components/launcher.js +++ b/components/launcher.js @@ -28,7 +28,9 @@ class MCLCore extends EventEmitter { // Lets the events register. our magic switch! await void(0); - this.emit('debug', `[MCLC]: MCLC version ${JSON.parse(fs.readFileSync(path.join(__dirname,'..', 'package.json'), { encoding: 'utf8' })).version}`); + if(fs.existsSync(path.join(__dirname,'..', 'package.json'))) { + this.emit('debug', `[MCLC]: MCLC version ${JSON.parse(fs.readFileSync(path.join(__dirname,'..', 'package.json'), { encoding: 'utf8' })).version}`); + } else { this.emit('debug', `[MCLC]: Package JSON not found, skipping MCLC version check.`); } const java = await this.handler.checkJava(this.options.javaPath || 'java'); if(!java.run) { this.emit('debug', `[MCLC]: Couldn't start Minecraft due to: ${java.message}`); diff --git a/package.json b/package.json index afc3e75..8cd22c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-launcher-core", - "version": "3.12.1", + "version": "3.12.2", "description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS", "main": "index.js", "dependencies": {