Open kf106 opened 1 year ago
So the logging in happens in minecraft-protocol/src/server/login.js and there does not appear to be anything to check that the number of players exceeds max players.
If you add
console.log("There are " + server.playerCount + " players and the maximum is " + server.maxPlayers)
if (server.playerCount >= server.maxPlayers) {
client.end('The server is full')
return
}
after line 37, which says client.username = packet.username
then it kicks any extra players trying to log on after the maximum.
Minecraft authentication is off, and I am connecting with 3 normal and 3 incognito browsers (Brave, Chrome) from two different PCs. Here is the settings file:
I'll look further myself to see how max-players is used, but I'm guessing this is a bug.