This repository was archived by the owner on Dec 10, 2025. It is now read-only.
Commit 88f7163
committed
refactor: Migrate CloudPlayer persistence & update player data protocols
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.1 parent 055792e commit 88f7163
File tree
71 files changed
+2009
-544
lines changed- .idea
- gradle
- surf-cloud-api
- surf-cloud-api-common
- src/main/kotlin/dev/slne/surf/cloud/api/common
- config/properties
- meta
- netty/protocol/buffer
- player
- name
- server
- util
- surf-cloud-api-server
- src/main/kotlin/dev/slne/surf/cloud/api/server
- exposed
- columns
- service
- table
- plugin
- surf-cloud-bukkit/src/main/kotlin/dev/slne/surf/cloud/bukkit
- listener/player
- player
- surf-cloud-core
- surf-cloud-core-client/src/main/kotlin/dev/slne/surf/cloud/core/client
- netty/network
- player
- surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud
- core/common
- config
- coroutines
- netty
- network
- protocol/running
- registry/listener
- processor
- player
- name
- surf-cloud-standalone-launcher
- src/main/java/dev/slne/surf/cloud/launcher
- surf-cloud-standalone
- src/main
- kotlin/dev/slne/surf/cloud/standalone
- config
- netty/server/network
- player
- db
- exposed
- player
- name
- repository
- service
- name
- plugin/spring
- spring/config
- test
- resources/db/migration
- surf-cloud-velocity/src/main/kotlin/dev/slne/surf/cloud/velocity
- listener/player
- player
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
71 files changed
+2009
-544
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
76 | | - | |
| 80 | + | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
Lines changed: 14 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | | - | |
6 | 5 | | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
16 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| |||
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 32 | + | |
29 | 33 | | |
30 | | - | |
31 | | - | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
631 | 632 | | |
632 | 633 | | |
633 | 634 | | |
634 | | - | |
| 635 | + | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
639 | | - | |
| 640 | + | |
640 | 641 | | |
641 | 642 | | |
642 | 643 | | |
| |||
655 | 656 | | |
656 | 657 | | |
657 | 658 | | |
658 | | - | |
| 659 | + | |
659 | 660 | | |
660 | | - | |
| 661 | + | |
661 | 662 | | |
662 | 663 | | |
663 | 664 | | |
| |||
834 | 835 | | |
835 | 836 | | |
836 | 837 | | |
837 | | - | |
| 838 | + | |
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
| |||
1064 | 1065 | | |
1065 | 1066 | | |
1066 | 1067 | | |
1067 | | - | |
| 1068 | + | |
1068 | 1069 | | |
1069 | 1070 | | |
1070 | 1071 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
0 commit comments