/setmaxplayers
< Commands
This feature is exclusive to Bedrock Edition and Minecraft Education.
/setmaxplayers| Permission level required |
3 |
|---|---|
| Restrictions |
Cheat only |
{
"title": "<code>/setmaxplayers</code>",
"rows": [
{
"field": "3",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Option article, displayed as Cheat) only<br>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Sets the maximum number of players allowed to join a multiplayer game.
Usage
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.
This command can be executed in singleplayer mode, but has no effect until the singleplayer world where the command was executed is reopened in multiplayer mode.
It has no effect on Realms.
Syntax
setmaxplayers <maxPlayers: int>
Arguments
maxplayers: int: int
- Specifies the desired new maximum number of players. If less than the current number of players or greater than 40, the argument is forced into this range.
- Must be a [Int]32-bit integer number (from -2147483648 (-231) to 2147483647 (231-1) ).
Result
| Command | Trigger | Bedrock Edition |
|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable |
| Otherwise | Successful |
History
| Pocket Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.1.0 | alpha 1.1.0.3 | Added /setmaxplayers. | |||||
| Bedrock Edition | |||||||
| 1.17.40 | beta 1.17.40.20 | The maximum value for maxPlayers: int has been increased from 30 to 40. | |||||