Skip to content

Support the 26.x player data layout and add a configurable world path - #271

Open
an0nn30 wants to merge 2 commits into
pdinklag:masterfrom
an0nn30:fix/269-player-data-layout
Open

Support the 26.x player data layout and add a configurable world path#271
an0nn30 wants to merge 2 commits into
pdinklag:masterfrom
an0nn30:fix/269-player-data-layout

Conversation

@an0nn30

@an0nn30 an0nn30 commented Aug 15, 2026

Copy link
Copy Markdown

Fixes #269.

Minecraft 26.x moved the player data into a players subdirectory of the world, so the statistics now live in <world>/players/stats rather than <world>/stats. Servers that update end up with an empty web frontend: discovery finds no files at the old path, so no players are collected at all.

As noted in #269, CLI users can work around this by pointing worldName at <world>/players, but plugin users have no equivalent option, since the plugin derives the world directory from the server's default world.

Changes

Automatic detection of both layouts. FileSystemDataSource now resolves the player data directory by checking whether <world>/players/stats exists, falling back to <world> otherwise. This means the same configuration keeps working across a server update, in both the plugin and the CLI, and the existing CLI workaround also continues to work.

New data → worldPath setting for the plugin. FileSystemDataSource additionally accepts an arbitrary world path instead of only a world name relative to the server directory. This is exposed as an optional plugin setting that defaults to null, in which case the previous behaviour of using the server's default world applies. It covers setups where the player data is not in the default world, for example because the world was moved or the host uses a custom world container.

The server path is deliberately kept separate from the world path, since usercache.json, banned-players.json, ops.json and server-icon.png are still read relative to the server directory no matter where the world is stored.

A warning when the stats directory is missing. Previously a wrong path just yielded zero players with nothing in the log, which made this quite hard to diagnose. Updater now logs the path it looked at.

A build fix. spigot-api 1.13.2 pulls in net.md-5:bungeecord-chat:1.13-SNAPSHOT transitively, which the Spigot snapshot repository no longer serves, so the build currently fails on a clean checkout. It is still available from repo.papermc.io, so that repository is added. Happy to split this into its own PR if you would prefer.

Testing

Verified against a local Paper 26.1.2 test server and on a live 26.1.2 server with 27 players:

  • New layout (<world>/players/stats) — players and awards are collected and the frontend populates, with no exceptions in the log. This was the failing case before the change.
  • Old layout (<world>/stats) on the local test server — unchanged, still collected correctly.
  • worldPath set to an absolute world path on the live server — collected correctly.

I have not specifically exercised the missing-directory warning path or a world stored outside the server directory beyond the above, so those rest on inspection rather than a run.

Backwards compatible: no existing configuration needs to change, and worldPath is optional and defaults to null.

an0nn30 and others added 2 commits August 15, 2026 17:53
The spigot-api 1.13.2 dependency pulls in net.md-5:bungeecord-chat:1.13-SNAPSHOT
transitively, which is no longer resolvable from the Spigot snapshot repository.
It is still served by repo.papermc.io, so the build works again for everyone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Newer Minecraft versions moved the player data into a "players" subdirectory
of the world, so the stats now live in <world>/players/stats instead of
<world>/stats. Servers that update end up with an empty web frontend, because
the old path no longer exists and discovery simply finds nothing.

FileSystemDataSource now detects both layouts, preferring the "players"
subdirectory when it contains a stats directory. This keeps the same
configuration working before and after a server update.

It also accepts an arbitrary world path rather than only a world name inside
the server directory, exposed to the plugin as the new "data -> worldPath"
setting. This covers setups where the player data is not in the server's
default world, e.g. because the world was moved or the host uses a custom
world container. The server path is kept separate, since the user cache,
banned players, ops and server icon are still read relative to it.

Finally, a missing stats directory is now logged instead of silently
producing no players at all, which made a misconfigured path hard to
diagnose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

New Update changes stats location

1 participant