Shuffle floor colors each round, keep eliminated players out of spectator mode, add optional match music
Build / build (push) Successful in 1m17s

This commit is contained in:
Michael Burgess
2026-08-07 11:24:43 -04:00
parent 796f8bd1de
commit a29f359009
6 changed files with 160 additions and 9 deletions
+33 -3
View File
@@ -114,6 +114,13 @@ work fine from console.
configured palette) across the whole region and serializes it into the arena's yml file
(`generated-layout`) so it can be restored exactly, every round, without re-scanning or
re-randomizing the world.
- By default the *positions* from that saved layout are reused every round, but which color
sits at which position is reshuffled (`floor.shuffle-each-round: true` in `config.yml`) at
the start of the match and before every round's restore — so the board isn't a static,
memorizable pattern for the whole game. The shuffle only permutes materials in memory; the
saved `generated-layout` itself is never modified, so a restart or another `/bp generate`
still starts from the original. Set `shuffle-each-round: false` to always restore the exact
saved layout unchanged instead.
### Billboards
@@ -149,7 +156,10 @@ nothing leaks.
target block is placed in your hotbar (slot 9) as a visual reminder. A boss bar (if
enabled) shows the remaining time as a shrinking progress bar.
- Get eliminated by not standing on the target color when the floor clears, or by falling
off entirely. Eliminated players become spectators at the configured spectator location.
off entirely. Eliminated players are teleported to the configured spectator location and
marked as spectators for gameplay purposes (no damage, can't interfere), but stay in
adventure mode rather than true spectator mode — no noclip/flight, just watching from where
they landed.
- Last player standing wins; rewards, stats and celebration effects (fireworks, titles,
sounds) fire automatically.
- **Solo play**: if a match starts with only one player (e.g. `min-players: 1` for testing),
@@ -166,14 +176,34 @@ nothing leaks.
future/optional batched floor operations — round-end removal and each round's floor reset
are always instantaneous, all blocks at once, by design),
`defaults.*` (used only when `/bp create` seeds a new arena), `default-floor-materials`
(the full 16-color concrete palette by default), `rewards.winner.commands`, and
`integrations.placeholderapi`.
(the full 16-color concrete palette by default), `floor.shuffle-each-round`, `music.*`
(see "Music" below), `rewards.winner.commands`, and `integrations.placeholderapi`.
- **`messages.yml`** — every user-facing string, in [MiniMessage](https://docs.advntr.dev/minimessage/format.html)
format (Adventure, bundled with Paper). Placeholders like `%player%`, `%arena%`, `%round%`,
`%time%`, `%color%` are substituted per-message.
- **`arenas/<name>.yml`** — one file per arena; a broken file only disables that one arena
(the rest still load) and the error is logged.
### Music
Optional background music for the duration of a match, off by default:
```yaml
music:
enabled: true
track: MUSIC_DISC_PIGSTEP
volume: 1.0
```
`track` is any Bukkit `Sound` enum name that's actually a track (one of the `MUSIC_DISC_*`
sounds, or a `MUSIC_*` ambient track) — invalid names are logged and skipped, never crash the
plugin. It plays on the client's dedicated **Music** volume slider (via `SoundCategory.MUSIC`),
separately from sound effects, starting when a match begins. It's paused the instant the floor
wipes each round and resumed once the floor has fully reset for the next round. Note this is a
stop/replay-from-the-start rather than a true mid-track pause/resume — vanilla Minecraft's sound
API has no seek/resume-from-position, so each "resume" restarts the track from the beginning.
It's stopped entirely at match end, arena disable, or plugin shutdown.
### Reload behavior
`/blockparty reload` re-reads `config.yml`, `messages.yml`, and every arena file. Arenas