feat(spawn): configure per-world spawn areas
Release / release (push) Failing after 12s
CI / build (push) Successful in 2m13s

This commit is contained in:
dmg
2026-08-08 13:18:39 -04:00
parent e646d12863
commit 18dfa058e5
11 changed files with 349 additions and 13 deletions
@@ -2,7 +2,7 @@
type: User Story
title: "US-003: Configure each world's spawn area"
description: Let administrators define an independent center and circular safe-spawn radius for every world.
status: backlog
status: done
---
# US-003: Configure each world's spawn area
@@ -11,17 +11,17 @@ As a **server administrator**, I want to configure the spawn area independently
## Acceptance criteria
- [ ] Every world has an independent spawn center and maximum spawn distance.
- [ ] Until an administrator sets a custom center, a world uses its native world spawn point.
- [ ] `/spawnadmin set` stores the executing administrator's current world, coordinates, yaw, and pitch as that world's center and facing direction.
- [ ] `/spawnadmin distance <blocks>` sets the current world's maximum spawn distance in blocks.
- [ ] `/spawnadmin info` displays the current world's effective center, whether it is native or custom, and maximum distance.
- [ ] The default maximum spawn distance is 20 blocks.
- [ ] The spawn area is circular, and random horizontal points are sampled uniformly by area within its radius.
- [ ] A maximum distance of `0` targets the configured center and adjusts it to the nearest safe block.
- [ ] Negative, non-numeric, or otherwise invalid distances are rejected with an explanatory message.
- [ ] Random destinations use the center's saved yaw and pitch.
- [ ] Per-world centers and distances survive server and plugin restarts.
- [x] Every world has an independent spawn center and maximum spawn distance.
- [x] Until an administrator sets a custom center, a world uses its native world spawn point.
- [x] `/spawnadmin set` stores the executing administrator's current world, coordinates, yaw, and pitch as that world's center and facing direction.
- [x] `/spawnadmin distance <blocks>` sets the current world's maximum spawn distance in blocks.
- [x] `/spawnadmin info` displays the current world's effective center, whether it is native or custom, and maximum distance.
- [x] The default maximum spawn distance is 20 blocks.
- [x] The spawn area is circular, and random horizontal points are sampled uniformly by area within its radius.
- [x] A maximum distance of `0` targets the configured center and adjusts it to the nearest safe block.
- [x] Negative, non-numeric, or otherwise invalid distances are rejected with an explanatory message.
- [x] Random destinations use the center's saved yaw and pitch.
- [x] Per-world centers and distances survive server and plugin restarts.
## Related