Commands/setmaxplayers

Sets the maximum number of players allowed to join a multiplayer game.
This command can be entered in single-player mode, but has no effect until you reopen the world in multiplayer mode.
It has no effect on Realms nor servers.
==Syntax==
:setmaxplayers <maxPlayers: int>
==Arguments==
:Specifies the desired new maximum number of players. If less than the current number of players or greater than the maximum number of connections the game version allowed (usually 30 or 40), the argument is forced into this range.
:
==Result==
Fails if the argument is not specified correctly.
On success, displays the new maximum number of players in the chat. An additional notification message is displayed if the number specified in the command was forced into the allowed range.
== History ==
ja:コマンド/setmaxplayers
zh:命令/setmaxplayers