mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-02-17 08:10:18 -05:00
Acknowledge returning to configuration state if in play state. (#1284)
* Acknowledge returning to configuration state if in play state. * Fix packet spelling
This commit is contained in:
parent
21240f8ab2
commit
092e10c53d
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,10 @@ module.exports = function (client, options) {
|
|||
|
||||
function enterConfigState () {
|
||||
if (client.state === states.CONFIGURATION) return
|
||||
// If we are returning to the configuration state from the play state, we ahve to acknowledge it.
|
||||
if (client.state === states.PLAY) {
|
||||
client.write('configuration_acknowledged', {})
|
||||
}
|
||||
client.state = states.CONFIGURATION
|
||||
// Server should send finish_configuration on its own right after sending the client a dimension codec
|
||||
// for login (that has data about world height, world gen, etc) after getting a login success from client
|
||||
|
|
Loading…
Reference in a new issue