Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function next () {
const version = require('minecraft-data')(self._client.version).version
if (supportedVersions.indexOf(version.majorVersion) === -1) {
throw new Error(`Version ${version.minecraftVersion} is not supported.`)
}
self.protocolVersion = version.version
self.majorVersion = version.majorVersion
self.version = version.minecraftVersion
options.version = version.minecraftVersion
self.emit('inject_allowed')
}
}