Skip to content

fix: report live player presence from game servers - #13

Open
FllipEis wants to merge 2 commits into
mainfrom
agent/report-game-server-presence
Open

fix: report live player presence from game servers#13
FllipEis wants to merge 2 commits into
mainfrom
agent/report-game-server-presence

Conversation

@FllipEis

@FllipEis FllipEis commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The controller needs a live source of truth from both proxies and game servers to repair stale cached player presence. Previously only Velocity and BungeeCord exposed the presence responder, leaving normal servers unverifiable.

This change enables the presence comparison responder on Spigot, legacy Spigot, Paper, Folia, Fabric, and NeoForge. Each platform reports its live player set and returns a full snapshot only when the controller's deterministic count-plus-placement fingerprint differs. The fingerprint contract is covered by a cross-language fixed-value test and detects equal-count player swaps.

The shared Java types now use generic names because they serve proxies and game servers:

  • ProxyPresenceResponderPresenceResponder
  • ProxyPresencePlayerPresencePlayer
  • ProxyPresencePlayerProviderPresencePlayerProvider
  • getProxyPresencePlayers()getPresencePlayers()

Proxy-specific session tracking and generated protobuf names remain unchanged.

Validation:

  • ./gradlew test -x :api:openApiGenerate -x :api:fixOpenApiGeneratedCode -x :api:prepareGeneratedSources
  • All platform modules compiled successfully.
  • Presence responder tests cover matching summaries, mismatches, equal-count drift, and the shared controller hash contract.

The OpenAPI generation tasks are excluded because the current generated controller schema on main no longer exposes ModelsPatchServerRequest.setPlayerCount, while the existing handwritten client still calls it. That unrelated mismatch also blocks an unmodified full generated build.

Deployment:

  • No protobuf or configuration migration is required.
  • Java integrations using the old presence type names must adopt the generic replacements.
  • Deploy this PR before the companion controller PR so game servers are ready to answer presence comparisons.

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