Fix wrong player count in minecraftvanilla protocol

This commit is contained in:
Pascal Sthamer 2020-02-15 22:05:13 +01:00
parent 98e2e68786
commit f2177204be
No known key found for this signature in database
GPG Key ID: BD32A96DA773ADAF

View File

@ -54,11 +54,12 @@ class MinecraftVanilla extends Core {
name: player.name
});
}
}
} else {
for (let i = 0; i < Math.min(json.players.online, 10000); i++) {
state.players.push({});
}
}
}
varIntBuffer(num) {
return Buffer.from(Varint.encode(num));