/spreadplayers Command in Minecraft Java Edition

Scatter Players and Entities Across the Map

Java EditionPlayers & EntitiesPermission: Level 2Bedrock version →

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.

Syntax (Java 26.3, 2 forms)

  1. /spreadplayers <center> <spreadDistance> <maxRange> <respectTeams> <targets>
  2. /spreadplayers <center> <spreadDistance> <maxRange> under <maxHeight> <respectTeams> <targets>

The forms you will use most

/spreadplayers <center> <spreadDistance> <maxRange> <respectTeams> <targets>
Scatters the chosen targets around a center point while keeping a minimum distance between them and staying within the maximum range.
/spreadplayers <center> <spreadDistance> <maxRange> under <maxHeight> <respectTeams> <targets>
Scatters the chosen targets around a center point and forces them to land at or below a specific height coordinate.

Arguments

ArgumentTypeWhat it means
<center>x z positionThe 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 / falseA true or false value that decides if players on the same team should be teleported to the exact same random spot.
<targets>target selectorThe player name, UUID, or target selector (such as @p, @a, @e, or @s) that you want to scatter.
<maxHeight>whole numberA whole number added in version 1.16 that sets the highest vertical level where targets are allowed to land.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.16 Syntax changed.
    + /spreadplayers <center> <spreadDistance> <maxRange> under <maxHeight> <respectTeams> <targets>
  2. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

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.

See /spreadplayers in Bedrock Edition →

FAQ

Why does the center argument only take two coordinates?

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.

When was the under maxHeight option added to Java Edition?

While /spreadplayers was already available in version 1.13, the syntax form using under <maxHeight> was added in Minecraft Java Edition 1.16.

What permission level do I need to use /spreadplayers?

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.

Related commands

/advancement/attribute/damage/defaultgamemode/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/summon/swing/teleport/tp