PlayersJavaBedrock

/spreadplayers

Randomly distributes the targeted entities around a center point, guaranteeing a minimum distance between them and keeping them within a maximum range. Optionally respects teams (keeping teammates together) and can cap the spread height for the under-roof variant. Useful for PvP match starts and minigames.

Syntax

Alternate forms:

Parameters

x z
coords
Center of the spread area.
spreadDistance
float
Minimum distance between targets.
maxRange
float
Maximum distance from center.
respectTeams
boolean
true keeps teammates clustered.
targets
entity selector
Entities to spread.

Examples

  • Scatter all players at least 50 blocks apart within 200 of origin.

  • Spread players, keeping teams together.

Permission level

/spreadplayers requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.