Add extra comment on why we are ignoring those states.

This commit is contained in:
William Gaylord 2024-03-07 15:11:17 -06:00
parent 28ce425764
commit 378a382f90

View file

@ -4,7 +4,7 @@ module.exports = function (client, options) {
client.on('disconnect', message => {
if (!message.reason) { return }
// Prevent the disconnect packet handler in the versionChecking code from triggering on PLAY or CONFIGURATION state disconnects
// Making it so the handler only runs when a version related disconnect occurs.
// Since version checking only happens during that HANDSHAKE / LOGIN state.
if (client.state === states.PLAY | client.state === states.CONFIGURATION) { return }
let parsed
try {