question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createServer maxPlayers does nothing

See original GitHub issue

I am just testing arround with making a pingable server and so far wrote this `mc = require(“minecraft-protocol”)

var serveroptions = { “port”: 25565, “host”: “127.0.0.1”, “kickTimeout”: 100000, // Kick after X ms without Keepalive, default 10s “checkTimeoutInterval”: 4000, // Send Server Keepalive every X seconds, default 4s “online-mode”: false, “beforePing”: (response,client)=>{console.log(response); return response}, // Modify Ping “motd”: “NodeJS Minecraft Server”, // MOTD, modifyable in beforePing “maxPlayers”: 13, “keepAlive”: true, // Send Keepalive Packets? Default true “version”: 47, // MOTD only or also connections? “customPackets”: {}, // ??? not referenced anywhere // “errorHandler” function overwrite // “stream”: ? // “connect”: relevant if using client through socks/http proxy “hideErrors”: false } mc.createServer(serveroptions)`

Now the problem is that serveroptions.maxPlayers does not seem to do anything, instead stays at the default 20. When making beforePing log response, it has “players: { max: 20, online: 0, sample: [] }” When pinging it with a game client, its 20 When logging client.maxPlayers, its undefined. All other arguments work, for example the serveroptions.motd works as expected.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
leumasmecommented, May 25, 2019

var s = mc.createServer(serveroptions); s.maxPlayers = 13 Works, but the way with options does not.

0reactions
rom1504commented, Jul 7, 2019

ok, now fixed, update to 1.9.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Increasing the Max Players on Your Satisfactory Server
This guide will walk you through how you can increase the Max Players allowed on your server. It's not something that Coffee Stain...
Read more >
Couldn't create server on port 28015 (startup error) - Rust
My server was working fine until I attempted to connect the Rust Admin Console to my server. Once I tried connecting it, I...
Read more >
Friend can't join my game after I create a server. - Counter-Strike
So I start up cs source, click create server, and set up the bots, there is no password, I make sure the max...
Read more >
Rust Dedicated Server - Valve Developer Community
You can run the Rust DS with ./RustDedicated -batchmode (Linux) or rust_server.exe -batchmode (Windows). Command line parameters. The startup command can be ...
Read more >
How to change "maxplayers" when creating a server?
It produces a message: Cannot change maxplayers while the server is running half-life.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found