Skip to content

feat(velocity): add a velocity module (proxy whitelist gate + MOTD)#19

Merged
hbrombeer merged 1 commit into
mainfrom
feat/velocity-whitelist-motd
Jun 4, 2026
Merged

feat(velocity): add a velocity module (proxy whitelist gate + MOTD)#19
hbrombeer merged 1 commit into
mainfrom
feat/velocity-whitelist-motd

Conversation

@hbrombeer
Copy link
Copy Markdown
Member

Makes the grounds platform integration run on the Velocity proxy, not just Paper. The proxy currently has no whitelist/MOTD (only plugin-agones discovery) — this adds them, the proxy-side counterpart of the Paper GroundsPlatform plugin.

Restructure (mirrors plugin-agones)

Single Paper module → common / paper / velocity:

  • commonPlatformEnv, WhitelistApiClient (+DTOs), PlatformCommand* poller/client/env + interfaces. Framework-agnostic (java.net.http + moshi codegen). KSP/moshi live here and are shaded into the platform jars.
  • paperGroundsPlatformPlugin + WhitelistSync + MotdSetter + PaperPlatformCommandExecutor. Behaviour unchanged; artifact name stays plugin-grounds-platform-<v>-all.jar.
  • velocity (new) — GroundsPlatformVelocityPlugin:
    • Whitelist gate — Velocity has no built-in whitelist, so it's enforced at the proxy: poll forge's …/whitelist/effective into a UUID set, deny LoginEvents whose authenticated UUID isn't in it. Fails open until the first successful sync (a forge hiccup at boot must not lock everyone out); off entirely without GROUNDS_TOKEN.
    • MOTD — set per ProxyPingEvent (project name white + short push id gray + "powered by…"), matching Paper.
    • Published as plugin-grounds-platform-velocity-<v>-all.jar.

release.yml now builds + uploads both module jars.

Verified

./gradlew build green (compile + tests + shadowJar for all modules). The velocity jar contains a generated velocity-plugin.json (main …GroundsPlatformVelocityPlugin), BuildInfo, and the shaded common classes (+ relocated moshi).

Next: bake plugin-grounds-platform-velocity into the velocity container image (like paper's GROUNDS_PLATFORM_PLUGIN_VERSION), then release + redeploy.

🤖 Generated with Claude Code

Splits the Paper-only single module into common/paper/velocity (mirroring
plugin-agones) so the platform integration can run on the Velocity proxy
too — the proxy now has no whitelist/MOTD, only plugin-agones discovery.

- common: PlatformEnv, WhitelistApiClient (+DTOs), PlatformCommand* poller/
  client/env + interfaces — all framework-agnostic (java.net.http + moshi
  codegen). KSP/moshi + shaded into the platform jars.
- paper: GroundsPlatformPlugin (JavaPlugin) + WhitelistSync + MotdSetter +
  PaperPlatformCommandExecutor (unchanged behaviour; artifact still
  plugin-grounds-platform-<v>-all.jar).
- velocity (new): GroundsPlatformVelocityPlugin. Velocity has no built-in
  whitelist, so it enforces at the proxy — polls forge's effective whitelist
  into a UUID set and denies LoginEvents not in it (fails OPEN until the
  first sync, off entirely without GROUNDS_TOKEN). MOTD set per ProxyPingEvent
  (project name + short push id), matching Paper. Published as
  plugin-grounds-platform-velocity-<v>-all.jar.

release.yml builds + uploads both module jars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hbrombeer hbrombeer merged commit fca4143 into main Jun 4, 2026
2 checks passed
@hbrombeer hbrombeer deleted the feat/velocity-whitelist-motd branch June 4, 2026 18:02
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