mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-09 11:30:13 +02:00
Ability to set infinite number of connections
This commit is contained in:
parent
c6fcf0bf83
commit
ebd6baf7b5
@ -139,7 +139,8 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
|
||||
}
|
||||
|
||||
if (packet instanceof PacketLoginStart) {
|
||||
if (server.getConnections().getCount() >= server.getConfig().getMaxPlayers()) {
|
||||
if (server.getConfig().getMaxPlayers() > 0 &&
|
||||
server.getConnections().getCount() >= server.getConfig().getMaxPlayers()) {
|
||||
disconnectLogin("Too many players connected");
|
||||
return;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ bind:
|
||||
port: 65535
|
||||
|
||||
# Max amount of players can join to server
|
||||
# Set -1 to make it infinite
|
||||
maxPlayers: 100
|
||||
|
||||
# Server's data in servers list
|
||||
|
Loading…
x
Reference in New Issue
Block a user