diff --git a/components/handler.js b/components/handler.js index 1260215..8f9ecf7 100644 --- a/components/handler.js +++ b/components/handler.js @@ -19,8 +19,8 @@ class Handler { const _request = request(url, {timeout: this.options.timeout || 10000}); - _request.on('error', function(error) { - this.client.emit('debug', `[MCLC]: Failed to download asset to ${path.join(directory, name)} due to\n${e}`); + _request.on('error', (error) => { + this.client.emit('debug', `[MCLC]: Failed to download asset to ${path.join(directory, name)} due to\n${error}`); resolve({ failed: true, asset: { @@ -136,6 +136,7 @@ class Handler { // why do we have this? B/c sometimes Minecraft's resource site times out! if(failed) { + this.client.emit('debug', '[MCLC]: Attempting to download failed assets'); await Promise.all(failed.map(async asset => await this.downloadAsync(asset.url, asset.directory, asset.name))) } diff --git a/package.json b/package.json index 281a870..63d3340 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-launcher-core", - "version": "3.6.1", + "version": "3.6.2", "description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS", "main": "index.js", "dependencies": {