Skip to content

feat(season): restart the lobby into a seasonal world during its window - #321

Merged
TheMeinerLP merged 19 commits into
mainfrom
feat/season
Sep 29, 2026
Merged

TheMeinerLP merged 19 commits into
mainfrom
feat/season

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Summary

A season is its own world, built by the build team as worlds/<name>/ with a map file. The lobby restarts into that world while the season window is active.

  • Config in avaje-config: seasons.<id>.{world,from,to,enabled} and seasons.zone (default Europe/Berlin).
  • New column features/season, cloudnet variant only. The local variant excludes it because nothing there would restart the lobby.

How it works

  • The world is chosen at startup via LobbyWorldChoice (in core), resolved by ServiceLoader in PlatformBeans.
  • Every 1200 ticks and after each disconnect, the column compares the started world with the desired one. If they differ, a restart is marked pending (logged once). The lobby stops via MinecraftServer.stopCleanly() only when nobody is online, and CloudNet restarts it.
  • Season end and the enabled kill switch use the same path.
  • Invalid config aborts startup. Invalid live config only warns, so it cannot cause a restart loop.

Why this shape

Trade-offs

  • No upper bound on waiting: a busy or AFK lobby delays the season. Operators can use /stop.
  • More than one LobbyWorldChoice aborts startup.

Out of scope (later changes)

Navigator icons, chat prefix, block/display/sound effects, stages/preview, /season list, player notice, local variant.

Tests

MapPoolTest, LobbyWorldResolutionTest, SeasonCalendarTest, SeasonConfigReaderTest, RestartPolicyTest, SeasonModuleTest (Cyano Env, injected Clock, env.tick()), SeasonWorldChoiceTest, VariantStartTest (both variants), SeasonLobbyWorldTest, SeasonRestartWiringTest (real BeanScope), SeasonMapFileNameTest. ./gradlew build is green.

Not tested: a real CloudNet restart cycle.

OpenSpec

Change: openspec/changes/seasonal-lobby-world

https://claude.ai/code/session_01A7aAe2E6wAEbi6jjnyPTWH

@TheMeinerLP
TheMeinerLP requested a review from a team as a code owner September 29, 2026 11:06
@github-actions

Copy link
Copy Markdown
Contributor

Test results

  255 files    255 suites   17m 14s ⏱️
  425 tests   424 ✅ 1 💤 0 ❌
1 275 runs  1 272 ✅ 3 💤 0 ❌

Results for commit 2c68de8.

@TheMeinerLP
TheMeinerLP merged commit 7582a59 into main Sep 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant