/setmaxplayers

This feature is exclusive to Bedrock Edition and Minecraft Education.
 
/setmaxplayers
Permission level
required

3

Restrictions

Cheat only

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

CommandTriggerBedrock Edition
AnyThe command is incomplete, or any argument is not specified correctly. Unparseable
OtherwiseSuccessful

History

Pocket Edition
1.1.0alpha 1.1.0.3Added /setmaxplayers.
Bedrock Edition
1.17.40beta 1.17.40.20The maximum value for maxPlayers: int has been increased from 30 to 40.

Navigation