-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add player hearbeats #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a7b1c18 to
4c1e092
Compare
4c1e092 to
2f0ba46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds player heartbeat functionality to maintain active player session state in the presence service. The heartbeat mechanism periodically sends batch updates for all connected players to ensure the backend service knows which players are still online.
Note: The PR title contains a spelling error: "hearbeats" should be "heartbeats".
Changes:
- Added a scheduled task that sends periodic heartbeat batches for all connected players
- Extended the gRPC client to support heartbeat batch operations
- Integrated heartbeat scheduler lifecycle management into the plugin initialization and shutdown
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| velocity/src/main/kotlin/gg/grounds/presence/PlayerPresenceService.kt | Added heartbeatBatch method to send player heartbeats via gRPC client |
| velocity/src/main/kotlin/gg/grounds/presence/PlayerHeartbeatScheduler.kt | New scheduler class that periodically sends heartbeats for all connected players |
| velocity/src/main/kotlin/gg/grounds/GroundsPluginPlayer.kt | Integrated heartbeat scheduler with plugin lifecycle (start/stop) |
| common/src/main/kotlin/gg/grounds/player/presence/GrpcPlayerPresenceClient.kt | Added heartbeatBatch gRPC method with error handling |
| common/build.gradle.kts | Changed dependency to local-SNAPSHOT version and added local repositories |
Comments suppressed due to low confidence (2)
common/build.gradle.kts:15
- The dependency version has been changed to 'local-SNAPSHOT' which is typically used only for local development. This should not be merged to a production branch. Ensure this is changed back to a proper release version (e.g., '0.1.0' or an appropriate version) before merging.
common/build.gradle.kts:5 - Adding mavenLocal() and mavenCentral() repositories appears to be related to the local-SNAPSHOT dependency. These repository additions should be removed along with reverting the dependency version to a proper release version before merging to production.
maven {
url = uri("https://maven.pkg.github.com/groundsgg/*")
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
velocity/src/main/kotlin/gg/grounds/presence/PlayerPresenceService.kt
Outdated
Show resolved
Hide resolved
velocity/src/main/kotlin/gg/grounds/presence/PlayerHeartbeatScheduler.kt
Outdated
Show resolved
Hide resolved
common/src/main/kotlin/gg/grounds/player/presence/GrpcPlayerPresenceClient.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
velocity/src/main/kotlin/gg/grounds/presence/PlayerHeartbeatScheduler.kt
Show resolved
Hide resolved
|
Merge groundsgg/library-grpc-contracts#33 and groundsgg/service-player#15 before this one. |
Pull Request
Description
Type of Change
Related Issues
None
Testing
Checklist