pdinklag / MinecraftStats

A Minecraft player statistics browser for the web - supports 1.13 and later!
https://discord.gg/brH5PGG8By
Other
230 stars 55 forks source link

Client update requirement handling #257

Open pdinklag opened 3 months ago

pdinklag commented 3 months ago

The next planned release of MinecraftStats will see the first client script upgrade since a good while.

Since going to Java, the web files have been separated from the CLI updater and thus need to be updated separately. Plugin users may have disabled the unpackWebFiles options if they modified the client style, so that the client won't auto update. Things will likely become a bit messy.

The server should write the Minecraft Stats version and minimum client version into the summary so that clients can check for themselves whether they need updating. In this case, they should display a message with a link to the proper readme section.

Ideally, this is done in combination with #120.

pdinklag commented 3 months ago

There may be another, more "forceful" way to solve this.

The updater, both CLI and plugin, knows the document root to where it will write the data directory. If there is an index.html in there, this could be marked (via comments in the first line, e.g.) with the MinecraftStats client version. If the server detects an outdated version, it can refuse to update until the client is updated.