Commands/setmaxplayers

Minecraft Wiki article. Categories: Bedrock_Edition, Minecraft_Education, Commands

📌 Mirrored from Minecraft Wiki

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.

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

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

CommandTriggerBedrock Edition
AnyThe 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
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.

Sources