mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-26 12:41:03 -04:00
throw an unsupported protocol version in createServer when asking for an unsupported version
This commit is contained in:
parent
c59d9e2687
commit
d3a9f7dcea
@ -26,6 +26,7 @@ function createServer (options = {}) {
|
||||
const optVersion = version === undefined || version === false ? require('./version').defaultVersion : version
|
||||
|
||||
const mcData = require('minecraft-data')(optVersion)
|
||||
if (!mcData) throw new Error(`unsupported protocol version: ${optVersion}`)
|
||||
const mcversion = mcData.version
|
||||
const hideErrors = options.hideErrors || false
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user