feat(velocity): add a velocity module (proxy whitelist gate + MOTD)#19
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
GroundsPlatformplugin.Restructure (mirrors plugin-agones)
Single Paper module →
common/paper/velocity:PlatformEnv,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.GroundsPlatformPlugin+WhitelistSync+MotdSetter+PaperPlatformCommandExecutor. Behaviour unchanged; artifact name staysplugin-grounds-platform-<v>-all.jar.GroundsPlatformVelocityPlugin:…/whitelist/effectiveinto a UUID set, denyLoginEvents 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 withoutGROUNDS_TOKEN.ProxyPingEvent(project name white + short push id gray + "powered by…"), matching Paper.plugin-grounds-platform-velocity-<v>-all.jar.release.ymlnow builds + uploads both module jars.Verified
./gradlew buildgreen (compile + tests + shadowJar for all modules). The velocity jar contains a generatedvelocity-plugin.json(main…GroundsPlatformVelocityPlugin),BuildInfo, and the shaded common classes (+ relocated moshi).Next: bake
plugin-grounds-platform-velocityinto thevelocitycontainer image (like paper'sGROUNDS_PLATFORM_PLUGIN_VERSION), then release + redeploy.🤖 Generated with Claude Code