Skip to content

Add getStatsDataPath method for statistical data retrieval#357

Merged
twisti-dev merged 4 commits into
version/26.1from
feat/stats-data-path-accessor
May 25, 2026
Merged

Add getStatsDataPath method for statistical data retrieval#357
twisti-dev merged 4 commits into
version/26.1from
feat/stats-data-path-accessor

Conversation

@twisti-dev
Copy link
Copy Markdown
Contributor

This pull request introduces a new API method for retrieving the path to the player statistics data directory and implements it for both the 1.21.11 and 26.1 NMS bridges. It also bumps the project version to 3.15.0. The changes ensure that the statistics data path can be accessed in a type-safe way across supported Minecraft versions.

API Additions

  • Added a new method getStatsDataPath(): Path to the SurfPaperNmsPlayerBridge interface and its API signatures, allowing retrieval of the stats data directory as a Path object. [1] [2] [3]

Implementation Updates

  • Implemented the getStatsDataPath() method in both V1_21_11SurfPaperNmsPlayerBridgeImpl and V26_1SurfPaperNmsPlayerBridgeImpl, using MinecraftServer.getServer().getWorldPath(LevelResource.PLAYER_STATS_DIR) to obtain the correct path. [1] [2]

Dependency and Import Maintenance

  • Updated imports in the bridge implementation files to include java.nio.file.Path and simplify storage-related imports. [1] [2] [3]

Versioning

  • Bumped the project version from 3.14.0 to 3.15.0 in gradle.properties to reflect the new API addition.

…eval

- implement getStatsDataPath to return the file system path for storing statistical data
- update SurfPaperNmsPlayerBridge and its implementations to include the new method
@twisti-dev twisti-dev self-assigned this May 25, 2026
Copilot AI review requested due to automatic review settings May 25, 2026 17:33
@twisti-dev twisti-dev merged commit b9c71b0 into version/26.1 May 25, 2026
4 of 7 checks passed
@twisti-dev twisti-dev deleted the feat/stats-data-path-accessor branch May 25, 2026 17:33
@twisti-dev twisti-dev review requested due to automatic review settings May 25, 2026 17:55
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.

1 participant