mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2025-02-23 20:51:30 +03:00
Incase package.json is removed, skip over version check.
This commit is contained in:
parent
cc9396a851
commit
4e9c2fbfb3
3 changed files with 5 additions and 3 deletions
|
@ -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}`);
|
||||
|
|
Loading…
Add table
Reference in a new issue