Skip to main content

/spreadplayers

Distributes entities randomly across an area. Useful for minigames, random spawn placement, and similar applications.

Category
World
Permission Level
Game Master
Version Added
1.6

Syntax

/spreadplayers <center> <spreadDistance> <maxRange> [under <maxHeight>] <respectTeams> <targets>

Parameters

NameTypeRequiredDescription
centervec2RequiredThe center point (x z) of the spread area.
spreadDistancefloatRequiredThe minimum distance between spread entities.
maxRangefloatRequiredThe maximum distance from the center that entities can be spread to.
maxHeightintegerOptionalMaximum Y height for placement (used with 'under' keyword).
respectTeamsbooleanRequiredIf true, players on the same team are placed together.
targetsentityRequiredThe entities to spread.

Examples

/spreadplayers 0 0 10 100 false @a

Spreads all players randomly within 100 blocks of 0,0 with at least 10 blocks between each player.

/spreadplayers 0 0 5 50 true @a

Spreads all players within 50 blocks of center, keeping teammates together.

/spreadplayers ~ ~ 3 20 under 100 false @a

Spreads players around your position, ensuring placement below Y=100.

Common Mistakes

Notes

Entities are placed on the highest solid block at each position. The 'under' parameter (added in 1.16) restricts placement to below a certain height, useful for cave games.

Related Commands

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting