Fix Server maxPlayers option

This commit is contained in:
extremeheat 2025-01-17 05:35:26 -05:00 committed by GitHub
commit 6b5aa08dba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,8 +118,9 @@ class Server extends EventEmitter {
return this.advertisement
}
async listen (host = this.options.host, port = this.options.port) {
this.raknet = new this.RakServer({ host, port }, this)
async listen () {
const { host, port, maxPlayer } = this.options
this.raknet = new this.RakServer({ host, port, maxPlayers }, this)
try {
await this.raknet.listen()