Server: correct body.protocol_version to body.params.protocol_version (#221)
packet.data is
```json
{
name: 'login',
params: {
protocol_version: 503,
tokens: {
identity: '...'
}
}
}
```
Therefore `body.protocol_version` outputs undefined.
This commit is contained in:
parent
f7c556ec94
commit
2d7c210acc
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ class Player extends Connection {
|
|||
const body = packet.data
|
||||
this.emit('loggingIn', body)
|
||||
|
||||
const clientVer = body.protocol_version
|
||||
const clientVer = body.params.protocol_version
|
||||
if (this.server.options.protocolVersion) {
|
||||
if (this.server.options.protocolVersion < clientVer) {
|
||||
this.sendDisconnectStatus('failed_spawn')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue