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

@twisti-dev twisti-dev commented Feb 17, 2025

This pull request represents a major progress milestone in our ongoing refactoring and consolidation effort. It includes a wide range of changes spanning multiple modules and layers of the project. Key changes include:

  • Module Restructuring and Reorganization:

    • Reorganize the cloud API client modules by splitting them into dedicated subprojects (common, Paper, and Velocity).
    • Update Gradle build files, core conventions, and settings to reflect the new module structure.
    • Remove obsolete documentation modules to streamline the repository.
  • Player Persistence and Data Handling:

    • Deprecate legacy JPA-based implementations in favor of a new Exposed-based DAO layer for CloudPlayer persistence.
    • Redefine CloudPlayer and OfflineCloudPlayer interfaces to include enhanced data retrieval methods (such as display name, last server, name history, and IP address retrieval).
    • Introduce new network packet definitions and protocols to support dynamic player data requests and responses, ensuring smoother server and client communication.
  • Network Protocol and Teleportation Utilities:

    • Update netty packet codecs and connection protocols.
    • Standardize teleportation utilities by consolidating and renaming methods and classes for clarity and consistent usage across platforms.
  • Build and Configuration Enhancements:

    • Incorporate updated dependency versions (e.g., moving Exposed to version 0.60.0 and refreshing netty dependencies).
    • Modify build configurations and script plugins (including Flyway and Spring Instrument) to enable smoother integration and runtime performance.
    • Fine-tune logging (now configurable via cloud properties) and remove redundant configuration files.

@twisti-dev twisti-dev added this to the Pre-release milestone Feb 17, 2025
@twisti-dev twisti-dev self-assigned this Feb 17, 2025
@twisti-dev twisti-dev marked this pull request as draft February 17, 2025 16:27
@twisti-dev twisti-dev linked an issue Feb 17, 2025 that may be closed by this pull request
5 tasks
@twisti-dev twisti-dev added priority: high dependencies Pull requests that update a dependency file status: in progress Issue is currently being worked on status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. status: needs testing Issue needs testing to confirm resolution. labels Feb 17, 2025
@ammodev ammodev self-requested a review March 14, 2025 14:03
This commit overhauls the player persistence and network data handling layers by:

• Removing legacy JPA-based implementations:
  - Deleted JPA entities, repositories, and services (e.g. CloudPlayerEntity, CloudPlayerNameHistoryEntity, CloudPlayerRepository, CloudPlayerService in the JPA flavor) along with outdated test files.

• Introducing an Exposed DAO persistence layer:
  - Added new Exposed-based CloudPlayerEntity and CloudPlayerNameHistoryEntity classes and their corresponding tables.
  - Created new CloudPlayerTables (and migration script V1__Add_cloud_player_tables.sql) to support the updated data schema.
  - Implemented a new CloudPlayerService using Exposed DAO and adjusted DAO service methods for player lookup, creation, and updates.

• Updating player management and data retrieval:
  - Modified StandaloneCloudPlayerImpl to store player name and IP address; its methods now delegate to the new Exposed service.
  - Enhanced OfflineCloudPlayerImpl to request updated player metadata (latest IP, last server, display name, name history, etc.) using newly defined netty request/response packets.
  - Added new serverbound data packets (ServerboundRequestPlayerDataPacket/DataRequestType and ServerboundRequestPlayerDataResponse) for handling various player data queries.

• Refining Netty protocol and network configuration:
  - Updated netty listener pipelines to use a configurable logging level (based on cloud configuration).
  - Adjusted packet registration and handling to integrate the new request/response flows.

• Build and configuration improvements:
  - Upgraded the Exposed dependency to version 0.60.0.
  - Added necessary dependencies (Flyway, MySQL Connector, Spring Instrument) and updated Gradle build files.
  - Introduced additional Spring configuration classes (AdditionalStandaloneConfiguration, PluginDatabaseConfig) to streamline the standalone module setup.

This migration from JPA to an Exposed-based persistence model simplifies database interactions and unifies player data retrieval through standardized netty protocols. It also improves clarity and consistency in the overall player management codebase.
@twisti-dev twisti-dev changed the title In the middle of the progress just saving Add OfflineCloudPlayer, Refactor & Restructure of Cloud API, Player Persistence, and Project Modules Apr 8, 2025
@twisti-dev twisti-dev marked this pull request as ready for review April 8, 2025 19:11
@twisti-dev twisti-dev requested review from Copilot and removed request for ammodev April 8, 2025 19:14
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.

Copilot reviewed 319 out of 332 changed files in this pull request and generated no comments.

Files not reviewed (13)
  • .idea/dataSources.xml: Language not supported
  • .idea/inspectionProfiles/Project_Default.xml: Language not supported
  • buildSrc/src/main/kotlin/core-convention.gradle.kts: Language not supported
  • buildSrc/src/main/kotlin/exclude-kotlin.gradle.kts: Language not supported
  • buildSrc/src/main/kotlin/library-conventions.gradle.kts: Language not supported
  • docs/build.gradle.kts: Language not supported
  • gradle.properties: Language not supported
  • gradle/wrapper/gradle-wrapper.properties: Language not supported
  • settings.gradle.kts: Language not supported
  • surf-cloud-api/surf-cloud-api-client/build.gradle.kts: Language not supported
  • surf-cloud-api/surf-cloud-api-client/surf-cloud-api-client-common/api/surf-cloud-api-client-common.api: Language not supported
  • surf-cloud-api/surf-cloud-api-client/surf-cloud-api-client-common/build.gradle.kts: Language not supported
  • surf-cloud-api/surf-cloud-api-client/surf-cloud-api-client-paper/api/surf-cloud-api-client-paper.api: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/qodana_code_quality.yml:12

  • The 'uses: production' line appears non-standard; please verify that it correctly references an existing reusable workflow or action required for the Qodana job.
uses: production

@twisti-dev twisti-dev merged commit c423525 into master Apr 8, 2025
@twisti-dev twisti-dev deleted the feat/offline-cloud-player branch April 8, 2025 19:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. status: in progress Issue is currently being worked on status: needs testing Issue needs testing to confirm resolution.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OfflineCloudPlayer

3 participants