Add high-score runs for score buckets

This commit is contained in:
2026-09-26 18:26:29 -07:00
parent b165d67118
commit 0e84cb1b0f
5 changed files with 439 additions and 6 deletions

View File

@@ -12,6 +12,10 @@
* `/score-bucket [bucketId]` - Switches your active bucket.
* `/score-bucket create <id> <singular> <plural> <initialValue> [admin|global|player|none]` - Creates a bucket (operators).
* `/score-bucket <playerName|all> <bucketId>` - Switches a player or the server default (operators).
* `/score-run start <bucket> <topN> <reset:true|false> target <score>` - Starts a target-score run (operators).
* `/score-run start <bucket> <topN> <reset:true|false> duration <time>` - Starts a timed run; time uses `s`, `m`, `h`, `d`, or `w` (operators).
* `/score-run start <bucket> <topN> <reset:true|false> until-disabled` - Starts a run without automatic expiry (operators).
* `/score-run stop <bucket>` - Ends an active run (operators).
When a player's active bucket changes, they are told the bucket name and their current score with its singular or plural unit.
@@ -22,6 +26,8 @@ NOTES:
Bucket reporting defaults to `none`; `admin` notifies operators and score admins, `global` notifies all online players, and `player` notifies only the scored player. Other plugins can create buckets with `createBucket(id, singular, plural, initialValue, reporting)` and use the bucket-aware score methods. Existing score methods operate on the player's active bucket. Bucket definitions, reporting policies, assignments, and scores are saved in `plugins/ScoreKeeper/scores.yml`.
Other plugins can start runs with `startTargetScoreRun`, `startTimedScoreRun`, or `startUntilDisabledScoreRun`, and end one with `stopHighScoreRun`. During a run, players receive their own score changes, while changes by current top-`n` players are reported globally. Finished runs publish a deterministic score-ordered table and each online player's place; reset runs restore the pre-run bucket scores.
## Development
See [CONTRIBUTING.md](CONTRIBUTING.md) for development environment setup instructions.