fix #getNextProtocolVersion crash from Bedrock having undefined versions
This commit is contained in:
parent
4d13965e6b
commit
ef2f2bd204
@ -249,6 +249,13 @@ class ServerRegistration {
|
||||
}
|
||||
|
||||
getNextProtocolVersion () {
|
||||
// Minecraft Bedrock Edition does not have protocol versions
|
||||
if (this.data.type === 'PE') {
|
||||
return {
|
||||
protocolId: 0,
|
||||
protocolIndex: 0
|
||||
}
|
||||
}
|
||||
const protocolVersions = minecraftVersions[this.data.type]
|
||||
if (typeof this._nextProtocolIndex === 'undefined' || this._nextProtocolIndex + 1 >= protocolVersions.length) {
|
||||
this._nextProtocolIndex = 0
|
||||
|
Loading…
Reference in New Issue
Block a user