diff --git a/src/index.js b/src/index.js index f8106088..ae86619a 100644 --- a/src/index.js +++ b/src/index.js @@ -45,17 +45,17 @@ class MCServer extends EventEmitter { connect (options) { const mcData = require('minecraft-data')(options.version) const version = mcData.version - let { 0: maxMajor, 1: maxMinor, 2: maxPatch = 0 } = latestSupportedVersion.split('.') - let { 0: minMajor, 1: minMinor, 2: minPatch = 0 } = oldestSupportedVersion.split('.') - let { 0: major, 1: minor, 2: patch = 0 } = version.minecraftVersion.split('.') + const { 0: maxMajor, 1: maxMinor, 2: maxPatch = 0 } = latestSupportedVersion.split('.') + const { 0: minMajor, 1: minMinor, 2: minPatch = 0 } = oldestSupportedVersion.split('.') + const { 0: major, 1: minor, 2: patch = 0 } = version.minecraftVersion.split('.') if (major > maxMajor || (major === maxMajor && minor > maxMinor) || (major === maxMajor && minor === maxMinor && patch > maxPatch)) { console.warn(`[WARNING] Version ${version.minecraftVersion} is newer than the latest supported version, ${latestSupportedVersion}`) console.warn(`[WARNING] The latest supported version is ${latestSupportedVersion}`) - console.warn(`[WARNING] It is unlikely that flying-squid will work correctly with this version`) + console.warn('[WARNING] It is unlikely that flying-squid will work correctly with this version') } else if (major < minMajor || (major === minMajor && minor < minMinor) || (major === minMajor && minor === minMinor && patch < minPatch)) { console.warn(`[WARNING] Version ${version.minecraftVersion} is older than the oldest supported version, ${oldestSupportedVersion}`) console.warn(`[WARNING] The oldest supported version is ${oldestSupportedVersion}`) - console.warn(`[WARNING] It is unlikely that flying-squid will work correctly with this version`) + console.warn('[WARNING] It is unlikely that flying-squid will work correctly with this version') } this.supportFeature = feature => mcData.supportFeature(feature)