Scatter Players and Entities Across the Map
The /spreadplayers command takes one or more players or entities and teleports them to random locations around a specific center point. You can control how far apart they land from each other, the maximum distance from the center, and whether teams stay together.
Server admins and map makers often use this command to start survival games, battle royales, or team matches. Because it requires permission level 2, you must be an operator on a server or have cheats enabled in your single-player world to run it.
/spreadplayers <center> <spreadDistance> <maxRange> <respectTeams> <targets>/spreadplayers <center> <spreadDistance> <maxRange> under <maxHeight> <respectTeams> <targets>/spreadplayers <center> <spreadDistance> <maxRange> <respectTeams> <targets>/spreadplayers <center> <spreadDistance> <maxRange> under <maxHeight> <respectTeams> <targets>| Argument | Type | What it means |
|---|---|---|
<center> | x z position | The X and Z coordinates that act as the middle point of the scattering area. |
<spreadDistance> | decimal number at least 0.0 | A decimal number of at least 0.0 that sets the minimum distance targets must be placed away from each other. |
<maxRange> | decimal number at least 1.0 | A decimal number of at least 1.0 that sets the furthest distance from the center point a target can land. |
<respectTeams> | true / false | A true or false value that decides if players on the same team should be teleported to the exact same random spot. |
<targets> | target selector | The player name, UUID, or target selector (such as @p, @a, @e, or @s) that you want to scatter. |
<maxHeight> | whole number | A whole number added in version 1.16 that sets the highest vertical level where targets are allowed to land. |
/spreadplayers 0 0 25.0 200.0 false @aScatters all players individually within 200 blocks of the world center (0, 0), keeping them at least 25 blocks apart.
/spreadplayers 150 -300 50.5 500.0 true @aTeleports all players around X=150, Z=-300 while keeping teammates together and placing each team at least 50.5 blocks away from other teams.
/spreadplayers 1000 2000 0.0 50.0 false SteveTeleports the player named Steve to a single random spot within 50 blocks of X=1000, Z=2000.
/spreadplayers -50 75 10.0 100.0 under 60 false @pTeleports the nearest player to a random location under height 60 around X=-50, Z=75, which is useful for placing someone inside a cave.
/spreadplayers 500 500 15.0 150.0 under 40 true @aScatters all teams into an underground area below Y=40 around the coordinates 500, 500.
/spreadplayers -200 -200 5.5 80.5 false @eScatters all loaded entities around X=-200, Z=-200 with at least 5.5 blocks between each entity.
/spreadplayers 25 40 0.0 15.0 under -10 false @sTeleports the player running the command to a random spot within 15 blocks of X=25, Z=40 at or below height -10.
Measured from the game files of every Java release from 1.13 to 26.3.
Bedrock Edition also includes the /spreadplayers command, but its syntax is slightly different: /spreadplayers <x: rotation> <z: rotation> <spreadDistance: float> <maxRange: float> <victim: target> [maxHeight: rotation]. Notice that Bedrock Edition does not have the <respectTeams> true or false option, and it puts the optional maxHeight number at the very end without using the word under.
The <center> argument only needs X and Z coordinates because the game automatically finds a vertical height for the targets to land on, unless you limit the height using the under <maxHeight> option.
While /spreadplayers was already available in version 1.13, the syntax form using under <maxHeight> was added in Minecraft Java Edition 1.16.
You need permission level 2, which means you must have cheats turned on in a single-player world or be an operator on a multiplayer server.
/advancement/attribute/damage/defaultgamemode/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/summon/swing/teleport/tp