Skip to content

Feat/microservice#37

Merged
ammodev merged 14 commits intoversion/1.21.11from
feat/microservice
Mar 20, 2026
Merged

Feat/microservice#37
ammodev merged 14 commits intoversion/1.21.11from
feat/microservice

Conversation

@ammodev
Copy link
Copy Markdown
Contributor

@ammodev ammodev commented Mar 19, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 19, 2026 11:48
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 PR introduces a microservice-based persistence layer (RabbitMQ + database) and refactors the client (Paper/Velocity) to use a shared ClientLoader/CoreInstance setup, while migrating service access to companion-object delegation and removing the legacy backend module.

Changes:

  • Add surf-core-microservice and RabbitMQ request/response packet types to move player/history persistence out of the in-process backend.
  • Introduce ClientLoader + CoreInstance and update Paper/Velocity bootstrapping + Redis usage to go through the new shared client layer.
  • Refactor API/service singletons (e.g., surfCoreApi, surfPlayerService, surfServerService) to companion-object delegation and update call sites.

Reviewed changes

Copilot reviewed 110 out of 111 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/task/SurfPlayerSyncTask.kt Switch to SurfPlayerService companion access; expose syncPlayers() for resync triggering.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/listener/VelocityRedisListener.kt Add resync event listener to trigger player sync.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/handler/SendPlayerToServerHandler.kt Route Redis usage through CoreInstance.redisApi.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/listener/VelocityServerListener.kt Migrate to SurfCoreApi/SurfServerService companion access.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/listener/ConnectionListener.kt Migrate to new service companion access for player/server/history services.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationService.kt Rename authentication service + move Redis access to CoreInstance.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationListener.kt Update references to renamed authenticationService.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/VelocityMain.kt Bootstrap via ClientLoader; remove old redis/database loaders; update service access.
surf-core-velocity/build.gradle.kts Remove backend runtime dependency; depend on core velocity module via version catalog.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/teleport/TeleportManager.kt Replace direct send+delay with sendAwaiting() and Redis teleport event publish.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/task/SurfServerInformationSyncTask.kt Use SurfServerService companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/redis/listener/PaperRedisListener.kt Use SurfServerService companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/listener/PlayerConnectListener.kt Use SurfPlayerService and CoreInstance.redisApi.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/WhereAmICommand.kt Use SurfPlayerService companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/SurfCoreCommand.kt Clear cache via SurfPlayerService; publish resync Redis event; use SurfCoreApi companion.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkServerMaxPlayersCommand.kt Publish max player change via CoreInstance.redisApi.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkServerCommand.kt Use SurfCoreApi companion access for sends.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkSendCommand.kt Use SurfCoreApi companion access for sends and listing.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkListCommand.kt Use SurfPlayerService companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkInformationCommand.kt Use SurfPlayerService/SurfServerService companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkBroadcastCommand.kt Use SurfCoreApi companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/HubCommand.kt Use SurfCoreApi companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperMain.kt Move lifecycle to async hooks; initialize via ClientLoader; remove db/redis loaders.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperBootstrap.kt Bootstrap Redis using ClientLoader/CoreInstance and register listeners.
surf-core-paper/build.gradle.kts Remove backend runtime dependency; depend on core paper module via version catalog.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/SkinHistoryHandler.kt Add Rabbit handlers for texture history persistence.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/NameHistoryHandler.kt Add Rabbit handlers for name history persistence.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/IpAddressHistoryHandler.kt Add Rabbit handlers for IP history persistence.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayersTable.kt New microservice DB table for players.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerTexturesHistoriesTable.kt New microservice DB table for texture history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerNameHistoriesTable.kt New microservice DB table for name history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerIpAddressHistoriesTable.kt New microservice DB table for IP history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerTextureHistoryRepository.kt DB repository for texture history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerRepository.kt DB repository for players (load/save).
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerNameHistoryRepository.kt DB repository for name history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerIpAddressHistoryRepository.kt DB repository for IP history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/CoreMicroservice.kt Microservice bootstrap (schema + Rabbit handlers).
surf-core-microservice/build.gradle.kts New microservice module build configuration.
surf-core-core/surf-core-core-velocity/build.gradle.kts Switch dependencies to new core-client module.
surf-core-core/surf-core-core-paper/build.gradle.kts Switch dependencies to new core-client module.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/server/SurfServerService.kt Replace top-level singleton with companion delegation; annotate collections as unmodifiable.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/watcher/PlayerProxyConnectionResultWatcher.kt Use CoreInstance.redisApi for Redisson reactive access.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/request/SendPlayerToServerRequest.kt Use CoreInstance.redisApi for request sending.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/request/SendPlayerToProxyRequest.kt Use CoreInstance.redisApi for request sending.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/event/SurfPlayerResyncRedisEvent.kt New Redis event to trigger player resynchronization.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/save/SaveSurfPlayerResponsePacket.kt New Rabbit response packet type.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/save/SaveSurfPlayerRequestPacket.kt New Rabbit request packet for saving a player.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/load/LoadPlayerByUuidRequestPacket.kt New Rabbit request packet for loading by UUID.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/load/LoadPlayerByNameRequestPacket.kt New Rabbit request packet for loading by name.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/TextureHistoryResponsePacket.kt New Rabbit response for texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/TextureHistoryRequestPacket.kt New Rabbit request for texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/SaveTextureHistoryResponsePacket.kt New Rabbit response for saving texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/SaveTextureHistoryRequestPacket.kt New Rabbit request for saving texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/SaveNameHistoryResponsePacket.kt New Rabbit response for saving name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/SaveNameHistoryRequestPacket.kt New Rabbit request for saving name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/NameHistoryResponsePacket.kt New Rabbit response for name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/NameHistoryRequestPacket.kt New Rabbit request for name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/SaveIpAddressHistoryResponsePacket.kt New Rabbit response for saving IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/SaveIpAddressHistoryRequestPacket.kt New Rabbit request for saving IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/IpAddressHistoryResponsePacket.kt New Rabbit response for IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/IpAddressHistoryRequestPacket.kt New Rabbit request for IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/SurfPlayerResponsePacket.kt New Rabbit response wrapper for a player.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/OptionalSurfPlayerResponsePacket.kt New Rabbit response wrapper for optional player.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerTextureHistoryService.kt Companion delegation pattern for texture history service.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerNameHistoryService.kt Companion delegation pattern for name history service.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerIpAddressHistoryService.kt Companion delegation pattern for IP history service.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/SurfPlayerService.kt Companion delegation pattern; remove init(), add unmodifiable view annotation.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/event/SurfEventBus.kt Publish Surf events via CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/database/DatabaseLoader.kt Remove legacy database loader abstraction.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/SurfCoreApiImpl.kt Switch to new service companion access + CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/CoreInstance.kt New required-service abstraction for shared core dependencies (Redis).
surf-core-core/surf-core-core-common/build.gradle.kts Enable microservice plugin + Rabbit client module.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/server/SurfServerServiceImpl.kt Move service impl into client module; remove fallback marker.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerTextureHistoryServiceImpl.kt Switch texture history persistence to Rabbit requests.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerNameHistoryServiceImpl.kt Switch name history persistence to Rabbit requests.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerIpAddressHistoryServiceImpl.kt Add IP history persistence via Rabbit requests.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/SurfPlayerServiceImpl.kt Implement SurfPlayer persistence via Rabbit (load/save) + Redis cache map.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/ClientLoader.kt New shared client bootstrap for Rabbit+Redis registration/connection lifecycle.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/ClientCoreInstance.kt Provide CoreInstance implementation for clients.
surf-core-core/surf-core-core-client/build.gradle.kts New client module build configuration.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/service/SurfPlayerServiceImpl.kt Remove legacy backend SurfPlayerService persistence.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/service/SurfPlayerIpAddressHistoryServiceImpl.kt Remove legacy backend IP history persistence.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerTextureHistoryRepository.kt Remove legacy backend texture history repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerNamehistoryHistoryRepository.kt Remove legacy backend name history repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerIpAddressHistoryRepository.kt Remove legacy backend IP history repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/DatabaseLoaderImpl.kt Remove legacy backend database loader implementation.
surf-core-backend/build.gradle.kts Remove legacy backend module build.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/util/core-velocity-util.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfProxyServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfPlayerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfOfflinePlayerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfCommonServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfBackendServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-velocity/build.gradle.kts Use version catalog project dependency.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/util/core-paper-util.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfProxyServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfPlayerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfOfflinePlayerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfCommonServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfBackendServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/PermissionCommonSurfServerArgument.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-paper/build.gradle.kts Use version catalog project dependency.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/util/surf-player-util.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/SurfServer.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/SurfProxyServer.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/CommonSurfServer.kt Switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/player/serializer/SurfPlayerSerializer.kt Switch to SurfCoreApi companion access for server lookups.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/player/SurfPlayer.kt Add sendAwaiting() helpers; switch to SurfCoreApi companion access.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/SurfCoreApi.kt Replace top-level singleton with companion delegation.
settings.gradle.kts Add settings plugins; include new client + microservice modules; remove backend module.
build.gradle.kts Add microservice Gradle plugin classpath dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@TheBjoRedCraft TheBjoRedCraft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change in api. Please revert

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 19, 2026

@ammodev I've opened a new pull request, #38, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 19, 2026 15:41
Co-authored-by: ammodev <32338899+ammodev@users.noreply.github.com>
Register SkinHistoryHandler in CoreMicroservice
Copilot AI review requested due to automatic review settings March 19, 2026 18:04
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 PR introduces a new “surf-core” microservice (DB + RabbitMQ) and refactors the Paper/Velocity clients to use the new client loader + service companion accessors (and CoreInstance) instead of the previous backend module + top-level service globals.

Changes:

  • Add a new surf-core-microservice with database tables/repositories and RabbitMQ handlers for player history data.
  • Replace top-level surfCoreApi / surfPlayerService / surfServerService accessors with companion-object delegation patterns; introduce CoreInstance for shared RedisApi access.
  • Remove the surf-core-backend module and adjust client bootstrap/startup to use ClientLoader (Redis + RabbitMQ).

Reviewed changes

Copilot reviewed 111 out of 112 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/task/SurfPlayerSyncTask.kt Exposes syncPlayers() and switches to SurfPlayerService companion usage.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/listener/VelocityRedisListener.kt Adds Redis event hook to trigger player resync.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/handler/SendPlayerToServerHandler.kt Routes Redis API access via CoreInstance.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/listener/VelocityServerListener.kt Migrates to SurfCoreApi/SurfServerService companion access.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/listener/ConnectionListener.kt Migrates player + server service usage to companion objects.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationService.kt Renames authentication service + migrates Redis access to CoreInstance.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationListener.kt Updates references to the renamed authentication service.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/VelocityMain.kt Switches startup/shutdown wiring to ClientLoader (Redis/Rabbit).
surf-core-velocity/build.gradle.kts Drops backend runtime dependency; uses version-catalog project reference.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/teleport/TeleportManager.kt Converts to object and uses sendAwaiting + Redis event publish.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/task/SurfServerInformationSyncTask.kt Switches server service access to companion object.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/redis/listener/PaperRedisListener.kt Switches server service access to companion object.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/listener/PlayerConnectListener.kt Migrates player service/Redis usage to SurfPlayerService + CoreInstance.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/WhereAmICommand.kt Migrates to SurfPlayerService companion access.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/SurfCoreCommand.kt Adds “resync players” Redis event; migrates to new access patterns.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkTeleportCommand.kt Updates TeleportManager reference after conversion to object.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkServerMaxPlayersCommand.kt Uses CoreInstance.redisApi to publish max-player change events.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkServerCommand.kt Migrates to SurfCoreApi companion usage.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkSendCommand.kt Migrates to SurfCoreApi companion usage.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkListCommand.kt Migrates to SurfPlayerService companion usage.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkInformationCommand.kt Migrates to SurfPlayerService/SurfServerService companion usage.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkBroadcastCommand.kt Migrates to SurfCoreApi companion usage.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/HubCommand.kt Migrates to SurfCoreApi companion usage.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperMain.kt Switches lifecycle to async hooks and ClientLoader wiring.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperBootstrap.kt Bootstraps ClientLoader and registers Redis listeners without backend module.
surf-core-paper/build.gradle.kts Drops backend runtime dependency; uses version-catalog project reference.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/SkinHistoryHandler.kt Adds Rabbit handlers for texture/skin history requests.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/NameHistoryHandler.kt Adds Rabbit handlers for name history requests.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/IpAddressHistoryHandler.kt Adds Rabbit handlers for IP history requests.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayersTable.kt Moves/renames players table into microservice module package.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerTexturesHistoriesTable.kt Moves/renames texture history table + FK reference.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerNameHistoriesTable.kt Moves/renames name history table + FK reference.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerIpAddressHistoriesTable.kt Moves/renames IP history table + FK reference.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerTextureHistoryRepository.kt Implements texture history persistence in microservice DB.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerRepository.kt Implements player persistence in microservice DB.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerNameHistoryRepository.kt Implements name history persistence in microservice DB.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerIpAddressHistoryRepository.kt Implements IP history persistence in microservice DB.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/CoreMicroservice.kt New microservice entrypoint: schema init + Rabbit handler registration.
surf-core-microservice/build.gradle.kts Adds standalone microservice module build configuration.
surf-core-core/surf-core-core-velocity/build.gradle.kts Swaps common dependency for new core-client module.
surf-core-core/surf-core-core-paper/build.gradle.kts Swaps common dependency for new core-client module.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/server/SurfServerService.kt Replaces top-level accessor with companion delegation; marks sets unmodifiable.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/watcher/PlayerProxyConnectionResultWatcher.kt Routes Redis API access via CoreInstance.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/request/SendPlayerToServerRequest.kt Routes Redis API access via CoreInstance.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/request/SendPlayerToProxyRequest.kt Routes Redis API access via CoreInstance.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/event/SurfPlayerResyncRedisEvent.kt Adds new Redis event for cross-server player resync.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/save/SaveSurfPlayerResponsePacket.kt Adds Rabbit response packet for saving a player.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/save/SaveSurfPlayerRequestPacket.kt Adds Rabbit request packet for saving a player.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/load/LoadPlayerByUuidRequestPacket.kt Adds Rabbit request packet for loading player by UUID.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/load/LoadPlayerByNameRequestPacket.kt Adds Rabbit request packet for loading player by name.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/TextureHistoryResponsePacket.kt Adds Rabbit response packet for texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/TextureHistoryRequestPacket.kt Adds Rabbit request packet for texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/SaveTextureHistoryResponsePacket.kt Adds Rabbit response packet for saving texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/SaveTextureHistoryRequestPacket.kt Adds Rabbit request packet for saving texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/SaveNameHistoryResponsePacket.kt Adds Rabbit response packet for saving name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/SaveNameHistoryRequestPacket.kt Adds Rabbit request packet for saving name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/NameHistoryResponsePacket.kt Adds Rabbit response packet for name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/NameHistoryRequestPacket.kt Adds Rabbit request packet for name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/SaveIpAddressHistoryResponsePacket.kt Adds Rabbit response packet for saving IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/SaveIpAddressHistoryRequestPacket.kt Adds Rabbit request packet for saving IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/IpAddressHistoryResponsePacket.kt Adds Rabbit response packet for IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/IpAddressHistoryRequestPacket.kt Adds Rabbit request packet for IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/SurfPlayerResponsePacket.kt Adds Rabbit response wrapper for SurfPlayer.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/OptionalSurfPlayerResponsePacket.kt Adds Rabbit response wrapper for nullable SurfPlayer.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerTextureHistoryService.kt Companion-delegated service accessor pattern.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerNameHistoryService.kt Companion-delegated service accessor pattern.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerIpAddressHistoryService.kt Companion-delegated service accessor pattern.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/SurfPlayerService.kt Companion-delegated service accessor pattern + unmodifiable players view.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/event/SurfEventBus.kt Routes event publishing via CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/database/DatabaseLoader.kt Removes legacy database loader abstraction (backend removed).
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/SurfCoreApiImpl.kt Migrates to new service access + CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/CoreInstance.kt Introduces shared service wrapper for RedisApi.
surf-core-core/surf-core-core-common/build.gradle.kts Enables microservice plugin + rabbit client module dependency.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/server/SurfServerServiceImpl.kt Client-side SurfServerService implementation backed by Redis.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerTextureHistoryServiceImpl.kt Client-side history uses RabbitMQ requests (microservice-backed).
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerNameHistoryServiceImpl.kt Client-side history uses RabbitMQ requests (microservice-backed).
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerIpAddressHistoryServiceImpl.kt Adds client-side IP history service via RabbitMQ.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/SurfPlayerServiceImpl.kt Adds client-side SurfPlayerService via Redis cache + Rabbit persistence.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/ClientLoader.kt Introduces Redis + Rabbit client bootstrap/wiring.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/ClientCoreInstance.kt Provides CoreInstance implementation for clients.
surf-core-core/surf-core-core-client/build.gradle.kts Adds new core-client module build config.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/service/SurfPlayerServiceImpl.kt Removes legacy backend persistence implementation.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/service/SurfPlayerIpAddressHistoryServiceImpl.kt Removes legacy backend persistence implementation.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerTextureHistoryRepository.kt Removes legacy backend DB repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerNamehistoryHistoryRepository.kt Removes legacy backend DB repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerIpAddressHistoryRepository.kt Removes legacy backend DB repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/DatabaseLoaderImpl.kt Removes legacy backend DB loader implementation.
surf-core-backend/build.gradle.kts Removes backend module build definition.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/util/core-velocity-util.kt Uses SurfCoreApi companion instead of top-level accessor.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfProxyServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfPlayerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfOfflinePlayerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfCommonServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfBackendServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-velocity/build.gradle.kts Uses version-catalog project dependency reference.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/util/core-paper-util.kt Uses SurfCoreApi companion instead of top-level accessor.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfProxyServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfPlayerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfOfflinePlayerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfCommonServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfBackendServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/PermissionCommonSurfServerArgument.kt Migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-paper/build.gradle.kts Uses version-catalog project dependency reference.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/util/surf-player-util.kt Uses SurfCoreApi companion for sendText.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/SurfServer.kt Migrates to SurfCoreApi companion usage.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/SurfProxyServer.kt Migrates to SurfCoreApi companion usage.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/CommonSurfServer.kt Migrates to SurfCoreApi companion usage.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/player/serializer/SurfPlayerSerializer.kt Uses SurfCoreApi companion when decoding server/proxy references.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/player/SurfPlayer.kt Adds sendAwaiting helpers and migrates to SurfCoreApi companion.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/SurfCoreApi.kt Introduces companion delegation and removes public top-level accessor.
settings.gradle.kts Adds plugin management + includes new client/microservice modules, removes backend.
build.gradle.kts Adds microservice gradle plugin classpath.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 19, 2026 20:44
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 PR introduces a new “core” microservice backed by RabbitMQ/DB for player persistence & history, and migrates Paper/Velocity clients to use a shared client loader (Redis + Rabbit) with service access via companion-object delegation instead of top-level requiredService vals.

Changes:

  • Add surf-core-microservice (RabbitMQ handlers + Exposed R2DBC schema/repositories) to serve player data and history.
  • Introduce CoreInstance/ClientCoreInstance + ClientLoader and refactor Paper/Velocity to bootstrap via the client loader (removing old backend/loader patterns).
  • Standardize API/service access to SurfCoreApi.*, SurfPlayerService.*, SurfServerService.* and add a Redis “player resync” event for cache re-sync.

Reviewed changes

Copilot reviewed 118 out of 119 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
build.gradle.kts Adds microservice Gradle plugin to buildscript.
gradle.properties Bumps project version to 2.0.0-SNAPSHOT.
settings.gradle.kts Adds plugin management + includes new surf-core-microservice and surf-core-core-client; removes backend module include.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/SurfCoreApi.kt Switches to companion-delegation access (SurfCoreApi.*) instead of surfCoreApi val.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/player/SurfPlayer.kt Uses SurfCoreApi companion and adds sendAwaiting(...) helpers.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/player/serializer/SurfPlayerSerializer.kt Uses SurfCoreApi companion for server/proxy resolution during decode.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/CommonSurfServer.kt Uses SurfCoreApi companion in operator get.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/SurfProxyServer.kt Uses SurfCoreApi companion for current proxy and player lookup.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/server/SurfServer.kt Uses SurfCoreApi companion for current server and player lookup.
surf-core-api/surf-core-api-common/src/main/kotlin/dev/slne/surf/core/api/common/util/surf-player-util.kt Routes SurfPlayer.sendText via SurfCoreApi companion.
surf-core-api/surf-core-api-paper/build.gradle.kts Updates dependency notation to version-catalog style.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/PermissionCommonSurfServerArgument.kt Uses SurfCoreApi companion for common server suggestions/lookup.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfBackendServerArgument.kt Uses SurfCoreApi companion for backend server lookup/suggestions.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfCommonServerArgument.kt Uses SurfCoreApi companion for common server lookup/suggestions.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfOfflinePlayerArgument.kt Uses SurfCoreApi companion for offline player resolution/suggestions.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfPlayerArgument.kt Uses SurfCoreApi companion for player lookup/suggestions.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/command/argument/SurfProxyServerArgument.kt Uses SurfCoreApi companion for proxy lookup/suggestions.
surf-core-api/surf-core-api-paper/src/main/kotlin/dev/slne/surf/core/api/paper/util/core-paper-util.kt Uses SurfCoreApi companion for Player.toSurfPlayer().
surf-core-api/surf-core-api-velocity/build.gradle.kts Updates dependency notation to version-catalog style.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfBackendServerArgument.kt Uses SurfCoreApi companion for backend server lookup.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfCommonServerArgument.kt Uses SurfCoreApi companion for common server lookup.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfOfflinePlayerArgument.kt Uses SurfCoreApi companion for offline player lookup.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfPlayerArgument.kt Uses SurfCoreApi companion for player lookup.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/command/argument/SurfProxyServerArgument.kt Uses SurfCoreApi companion for proxy lookup.
surf-core-api/surf-core-api-velocity/src/main/kotlin/dev/slne/surf/core/api/velocity/util/core-velocity-util.kt Uses SurfCoreApi companion for Player.toSurfPlayer().
surf-core-backend/build.gradle.kts Removes old backend module build definition.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/DatabaseLoaderImpl.kt Removes old DB loader implementation.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerIpAddressHistoryRepository.kt Removes old IP history repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerNamehistoryHistoryRepository.kt Removes old name history repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerRepository.kt Removes old player repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/repository/SurfPlayerTextureHistoryRepository.kt Removes old texture history repository.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/service/SurfPlayerIpAddressHistoryServiceImpl.kt Removes old IP history service.
surf-core-backend/src/main/kotlin/dev/slne/surf/core/fallback/service/SurfPlayerServiceImpl.kt Removes old player service implementation.
surf-core-core/surf-core-core-client/build.gradle.kts Adds new client module with Redis + Rabbit client wiring.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/ClientCoreInstance.kt Introduces ClientCoreInstance as a CoreInstance specialization.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/ClientLoader.kt Adds unified client bootstrap/load/enable/disable lifecycle for Redis+Rabbit.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/SurfPlayerServiceImpl.kt New client-side SurfPlayerService using Redis cache + Rabbit persistence.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerIpAddressHistoryServiceImpl.kt New client-side IP history service via Rabbit requests.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerNameHistoryServiceImpl.kt Migrates name history to Rabbit-backed microservice calls.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/player/history/SurfPlayerTextureHistoryServiceImpl.kt Migrates texture history to Rabbit-backed microservice calls.
surf-core-core/surf-core-core-client/src/main/kotlin/dev/slne/surf/core/client/server/SurfServerServiceImpl.kt Migrates server service impl to use client Redis API (no fallback marker).
surf-core-core/surf-core-core-common/build.gradle.kts Enables microservice client API module + updates dependency notation.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/CoreInstance.kt Introduces CoreInstance exposing shared Redis/Rabbit APIs via required service.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/SurfCoreApiImpl.kt Replaces old service vals with companion-delegated services + CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/database/DatabaseLoader.kt Removes old DB loader contract.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/event/SurfEventBus.kt Publishes events via CoreInstance.redisApi instead of removed redisApi val.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/SurfPlayerService.kt Switches to companion delegation; removes explicit init(); adds unmodifiable view annotation.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerIpAddressHistoryService.kt Switches to companion delegation pattern.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerNameHistoryService.kt Switches to companion delegation pattern.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/player/history/SurfPlayerTextureHistoryService.kt Switches to companion delegation pattern.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/OptionalSurfPlayerResponsePacket.kt Adds Rabbit response packet for optional player payload.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/SurfPlayerResponsePacket.kt Adds Rabbit response packet for player payload.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/IpAddressHistoryRequestPacket.kt Adds Rabbit request packet for IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/IpAddressHistoryResponsePacket.kt Adds Rabbit response packet for IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/SaveIpAddressHistoryRequestPacket.kt Adds Rabbit request packet to save IP history entry.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/ip/SaveIpAddressHistoryResponsePacket.kt Adds Rabbit response packet for saving IP history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/NameHistoryRequestPacket.kt Adds Rabbit request packet for name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/NameHistoryResponsePacket.kt Adds Rabbit response packet for name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/SaveNameHistoryRequestPacket.kt Adds Rabbit request packet to save name history entry.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/name/SaveNameHistoryResponsePacket.kt Adds Rabbit response packet for saving name history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/SaveTextureHistoryRequestPacket.kt Adds Rabbit request packet to save texture history entry.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/SaveTextureHistoryResponsePacket.kt Adds Rabbit response packet for saving texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/TextureHistoryRequestPacket.kt Adds Rabbit request packet for texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/history/texture/TextureHistoryResponsePacket.kt Adds Rabbit response packet for texture history.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/load/LoadPlayerByNameRequestPacket.kt Adds Rabbit request packet to load player by name.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/load/LoadPlayerByUuidRequestPacket.kt Adds Rabbit request packet to load player by UUID.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/save/SaveSurfPlayerRequestPacket.kt Adds Rabbit request packet to persist player info.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/rabbit/packet/player/save/SaveSurfPlayerResponsePacket.kt Adds Rabbit response packet for player save.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/RedisLoader.kt Removes old Redis loader wrapper.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/event/SurfPlayerResyncRedisEvent.kt Adds Redis event to trigger player cache re-sync.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/request/SendPlayerToProxyRequest.kt Routes requests via CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/request/SendPlayerToServerRequest.kt Routes requests via CoreInstance.redisApi.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/redis/watcher/PlayerProxyConnectionResultWatcher.kt Uses CoreInstance.redisApi for Redisson reactive set cache.
surf-core-core/surf-core-core-common/src/main/kotlin/dev/slne/surf/core/core/common/server/SurfServerService.kt Switches to companion delegation; marks returned sets as unmodifiable views.
surf-core-core/surf-core-core-paper/build.gradle.kts Switches core-paper to depend on new surf-core-core-client.
surf-core-core/surf-core-core-velocity/build.gradle.kts Switches core-velocity to depend on new surf-core-core-client.
surf-core-microservice/build.gradle.kts Adds new standalone microservice module with DB/Redis/Rabbit wiring.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/CoreMicroservice.kt Adds microservice bootstrap: schema creation + Rabbit handler registration.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/SurfCoreApiMicroserviceImpl.kt Adds minimal SurfCoreApi impl for microservice runtime identity.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerIpAddressHistoryRepository.kt Adds DB repository for IP history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerNameHistoryRepository.kt Adds DB repository for name history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerRepository.kt Adds DB repository for players (load/save/upsert).
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/repository/SurfPlayerTextureHistoryRepository.kt Adds DB repository for texture history.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerIpAddressHistoriesTable.kt Renames/moves IP history table into microservice namespace.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerNameHistoriesTable.kt Renames/moves name history table into microservice namespace.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayerTexturesHistoriesTable.kt Renames/moves texture history table into microservice namespace.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/database/tables/SurfPlayersTable.kt Renames/moves player table into microservice namespace.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/IpAddressHistoryHandler.kt Adds Rabbit handler for IP history requests/saves.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/NameHistoryHandler.kt Adds Rabbit handler for name history requests/saves.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/SkinHistoryHandler.kt Adds Rabbit handler for texture history requests/saves.
surf-core-microservice/src/main/kotlin/dev/slne/surf/core/microservice/rabbit/SurfPlayerHandler.kt Adds Rabbit handler for player load/save.
surf-core-paper/build.gradle.kts Adds RabbitMQ dependency declarations and migrates to new core-paper dependency.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperBootstrap.kt Bootstraps via ClientCoreInstance.clientLoader and connects Redis listeners.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperCoreInstance.kt Adds Paper CoreInstance implementation (service-loaded) for client loader.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/PaperMain.kt Moves to suspending async lifecycle; uses ClientLoader enable/disable and SurfServerService companion.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/HubCommand.kt Uses SurfCoreApi companion for hub selection/send.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkBroadcastCommand.kt Uses SurfCoreApi companion for broadcast.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkInformationCommand.kt Uses service companions for server/player counts.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkListCommand.kt Uses SurfPlayerService companion for listing.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkSendCommand.kt Uses SurfCoreApi companion for player sending.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkServerCommand.kt Uses SurfCoreApi companion for server send.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkServerMaxPlayersCommand.kt Publishes max players change via CoreInstance.redisApi.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/NetworkTeleportCommand.kt Uses TeleportManager singleton object.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/SurfCoreCommand.kt Adds cache clear + publishes SurfPlayerResyncRedisEvent.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/command/WhereAmICommand.kt Uses SurfPlayerService companion for cached player lookup.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/listener/PlayerConnectListener.kt Uses CoreInstance.redisApi and SurfPlayerService companion.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/redis/listener/PaperRedisListener.kt Uses SurfServerService companion on max players change event.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/task/SurfServerInformationSyncTask.kt Uses SurfServerService companion for server updates.
surf-core-paper/src/main/kotlin/dev/slne/surf/core/paper/teleport/TeleportManager.kt Refactors teleport flow to use sendAwaiting + Redis event publishing.
surf-core-velocity/build.gradle.kts Removes backend runtime and adds plugin dependency; updates dependency notation.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/VelocityCoreInstance.kt Adds Velocity CoreInstance implementation (service-loaded) for client loader.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/VelocityMain.kt Boots via ClientLoader and updates redis/request wiring + service companions.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationListener.kt Renames service usage to authenticationService.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationService.kt Fixes spelling and uses CoreInstance.redisApi maps.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/listener/ConnectionListener.kt Migrates service access to companions and simplifies texture history call.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/listener/VelocityServerListener.kt Migrates API/service access to companions.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/handler/SendPlayerToServerHandler.kt Uses CoreInstance.redisApi instead of removed redisApi val.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/redis/listener/VelocityRedisListener.kt Adds listener for SurfPlayerResyncRedisEvent triggering player sync.
surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/task/SurfPlayerSyncTask.kt Migrates to SurfPlayerService companion and exposes syncPlayers() for resync events.

💡 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 118 out of 119 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

surf-core-velocity/src/main/kotlin/dev/slne/surf/core/velocity/auth/AuthenticationService.kt:26

  • The service has been renamed to AuthenticationService, but the Redis map names and cookie key still use the misspelling authentification. If this is intentional for backwards compatibility, add a brief comment explaining that these identifiers must not be changed. Otherwise, consider correcting them now (with a migration plan) to avoid propagating the typo into new code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

TheBjoRedCraft
TheBjoRedCraft previously approved these changes Mar 20, 2026
Copilot AI review requested due to automatic review settings March 20, 2026 15:56
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 118 out of 119 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +96 to +97
val surfServer = SurfServer[serverName] ?: return

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If SurfServer[serverName] is null, this returns silently and leaves the cached SurfPlayer without an updated currentServer, which can break downstream logic that relies on it. Consider logging and either disconnecting the player with an error component or setting currentServer = null explicitly so the failure is visible and state is consistent.

Copilot uses AI. Check for mistakes.
@ammodev ammodev merged commit 8e67d4a into version/1.21.11 Mar 20, 2026
4 checks passed
@ammodev ammodev deleted the feat/microservice branch March 20, 2026 16:05
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.

4 participants