Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Conversation

@twisti-dev
Copy link
Contributor

Summary

  • move PrePlayerJoinTask into API module
  • allow dynamic registration via PrePlayerJoinTaskAutoRegistrationHandler
  • extend PrePlayerJoinTaskManager with register helpers
  • wire auto-registration bean when starting plugin contexts
  • adapt implementations to use the new API type

Testing

  • ./gradlew test --no-daemon (fails: Kotlin daemon terminated)

https://chatgpt.com/codex/tasks/task_e_685a50efc93883288bd5f83df3b3eb74

Copy link
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 refactors the PrePlayerJoinTask API to be public and enhances its dynamic registration. Key changes include moving PrePlayerJoinTask into the API module, introducing helper registration methods in PrePlayerJoinTaskManager, and wiring an auto-registration handler for plugin contexts.

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
surf-cloud-velocity/src/main/kotlin/dev/slne/surf/cloud/velocity/player/ValidateVelocityPlayerJoin.kt Updated preJoin signature to use OfflineCloudPlayer from the new API.
surf-cloud-velocity/src/main/kotlin/dev/slne/surf/cloud/velocity/listener/player/ConnectionListener.kt Adjusted import for PrePlayerJoinTask.Result to align with the public API.
surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/player/punishment/handler/DefaultBanPunishmentHandler.kt Updated preJoin signature to use OfflineCloudPlayer.
surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/player/punishment/PunishmentManagerImpl.kt Switched to the public API types for preJoin.
surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/player/StandaloneCloudPlayerManagerImpl.kt Modified import for PrePlayerJoinTask to use the new API package.
surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/task/PrePlayerJoinTaskManager.kt Introduced registerTask(s) and unregisterTask helper methods.
surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/task/PrePlayerJoinTaskAutoRegistrationHandler.kt Added auto-registration logic for PrePlayerJoinTask implementations.
surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/punishment/type/mute/MutePunishmentListener.kt Updated preJoin signature accordingly.
surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/punishment/CloudPlayerPunishmentManagerBridgeImpl.kt Adjusted preJoin usage to reflect API changes.
surf-cloud-api/surf-cloud-api-common/src/main/kotlin/dev/slne/surf/cloud/api/common/player/task/PrePlayerJoinTask.kt Moved package to the API module and updated the preJoin signature.
Comments suppressed due to low confidence (1)

surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/task/PrePlayerJoinTaskManager.kt:37

  • [nitpick] Consider adding Kotlin doc comments for the new registration helper methods (registerTask, registerTasks, unregisterTask) to clarify their expected usage and side effects for API consumers.
    fun registerTask(task: PrePlayerJoinTask) {

@twisti-dev twisti-dev self-assigned this Jun 24, 2025
Base automatically changed from 11-multi-proxy-support-for-load-balancing-and-scalability to master July 22, 2025 11:51
@twisti-dev twisti-dev closed this Jul 23, 2025
@twisti-dev twisti-dev deleted the codex/make-preplayerjointask-api-public branch July 23, 2025 15:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants