Skip to content

feat: owners can reset the stats of a player or server to 0 (plugin 3.25) - #11

Merged
faolan-exe merged 1 commit into
mainfrom
feat/stats-reset
Nov 8, 2026
Merged

faolan-exe merged 1 commit into
mainfrom
feat/stats-reset

Conversation

@faolan-exe

Copy link
Copy Markdown
Owner

Owners can set the stats of one player or the whole server back to 0 in the Gefahrenzone of /manage/<id>. Emptying a stats file never worked: the database only stores values it receives, and the game writes online players back from memory.

  • The plugin clears online players in memory and deletes the stats files, then answers !STATSRESET. Only then the database is cleared, so older stats cannot return.
  • Deleted: values, snapshots, achievements, trophies, records, streak badges, finished sessions, reward level. Decisions and what stays: docs/adr/0005-stats-reset.md.
  • Refused while the plugin is away or older than 3.25. The result goes to the moderation log.

Checked: mvn package, ruff. New tests in tests/test_stats_reset.py cover the owner check, confirmation, plugin order, and limits between players and servers; they need Postgres, so they run in CI.

….25)

Emptying a stats file had no effect: the database only stores values it
receives and the game writes online players back from memory. The plugin
now clears the game first, the database follows on its answer (ADR 0005).
@faolan-exe
faolan-exe merged commit a27584f into main Nov 8, 2026
2 checks passed
@faolan-exe
faolan-exe deleted the feat/stats-reset branch November 8, 2026 21:06
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