Commands/setmaxplayers
Minecraft Wiki article. Categories: Bedrock_Edition, Minecraft_Education, Commands
This article is reproduced from Commands/setmaxplayers on the Minecraft Wiki. Mirrored from revision 3685649. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
/setmaxplayers{
"title": "<code>/setmaxplayers</code>",
"rows": [
{
"field": "3",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Cheat 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.
The command is not available on Xbox.
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 |
| The float is either a decimal, below the 32-bit integer minimum, or above the 32-bit integer maximum. | Unparseable | |
| Permission level under 3. | 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. | |||||
External links
- "
/setmaxplayersCommand" – Microsoft Learn, October 11, 2023.
Navigation
Sources
- Commands/setmaxplayers — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3685649.