Feat/launcher#47
Open
TheBjoRedCraft wants to merge 28 commits into
Open
Conversation
…lity and error handling
… case handling for plugin names
… for improved readability
…rove plugin update checks
# Conflicts: # gradle.properties # surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/permission/PermissionList.kt
# Conflicts: # surf-core-api/surf-core-api-common/build.gradle.kts
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new core launcher module that can start/monitor a Minecraft server process (including Redis bootstrap, crash/unreachable detection, and optional plugin auto-updates), and wires Paper/Velocity to avoid double-firing SurfServerStartEvent when launched via the launcher. Also introduces Redis events for service status notifications and updates build tooling (new included modules + Gradle wrapper/version bump).
Changes:
- Introduce
surf-core-launcher(API + server) with process launch, Redis bootstrap, plugin update checking, and MC reachability/crash monitoring. - Add service-status Redis event + Velocity-side notification listener and a command to opt out of those notifications.
- Adjust Paper/Velocity startup behavior to skip local start-event fire when launched by the core launcher; move
SurfEventFireRedisEventinto the API module.
Reviewed changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/VelocityMain.kt | Skip firing SurfServerStartEvent when launched by core launcher. |
| surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/listener/VelocityRedisListener.kt | Listen for service status Redis events and notify players (with opt-out). |
| surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/permission/PermissionList.kt | Add permission for toggling service status messages. |
| surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/command/CoreCommand.kt | Add toggle command and display launcher state in version output. |
| surf-core-velocity/build.gradle.kts | Depend on launcher API. |
| surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperBootstrap.kt | Skip firing SurfServerStartEvent when launched by core launcher. |
| surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/SurfCoreCommand.kt | Adds (commented-out) debug commands; otherwise unchanged behavior. |
| surf-core-paper/build.gradle.kts | Depend on launcher API. |
| surf-core-launcher/surf-core-launcher-server/src/main/resources/logging.properties | Add JUL console formatting for launcher output. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/updater/UpdatablePlugin.kt | Model for updateable plugins and GitHub release URL derivation. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/updater/process/PluginUpdater.kt | Concurrent update check + download/backup logic. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/updater/process/PluginScanner.kt | Scan plugin jars and read metadata from Velocity/Paper descriptors. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/updater/github/GitHubClient.kt | Minimal GitHub API client for release fetch + asset download. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/updater/cooldown/UpdateCooldownTracker.kt | Persisted cooldown tracking to avoid repeated update attempts. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/ping/ping-util.kt | Packet utilities for Minecraft status ping. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/ping/MinecraftServerPinger.kt | Monitor process exit + periodic reachability checks, publish status events. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/CoreLauncherEnvironment.kt | Read server memory/port from environment. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/CoreLauncher.kt | Main launcher orchestration: Redis, updating, process start, monitoring, shutdown. |
| surf-core-launcher/surf-core-launcher-server/src/main/kotlin/dev/slne/surf/core/launcher/server/config/CoreLauncherConfig.kt | Launcher config model + config file binding. |
| surf-core-launcher/surf-core-launcher-server/build.gradle.kts | New standalone app module build + main class manifest. |
| surf-core-launcher/surf-core-launcher-api/src/main/kotlin/dev/slne/surf/core/launcher/api/redis/ServiceStatusRedisEvent.kt | New Redis event type for service status. |
| surf-core-launcher/surf-core-launcher-api/src/main/kotlin/dev/slne/surf/core/launcher/api/LauncherConstants.kt | Shared constant for launcher system property flag. |
| surf-core-launcher/surf-core-launcher-api/build.gradle.kts | New launcher API module build/publishing. |
| surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/event/SurfEventBus.kt | Update import to new SurfEventFireRedisEvent package. |
| surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/event/LocalSurfEventBusListener.kt | Update import to new SurfEventFireRedisEvent package. |
| surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/state/SurfServiceStatus.kt | New enum for CRASHED/UNREACHABLE service states. |
| surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/event/redis/SurfEventFireRedisEvent.kt | Move Redis event wrapper into API package. |
| surf-core-api/surf-core-api-common/build.gradle.kts | Enable SurfRedis for API-common module. |
| settings.gradle.kts | Include new launcher modules. |
| gradlew.bat | Update wrapper script logic/exit handling. |
| gradlew | Update wrapper metadata link. |
| gradle/wrapper/gradle-wrapper.properties | Bump Gradle distribution + wrapper settings. |
| gradle.properties | Bump project version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
No description provided.