Updates modrinth info.

This commit is contained in:
2026-09-26 19:52:05 -07:00
parent 4d142ad9d1
commit 50a66a254c
7 changed files with 105 additions and 38 deletions

49
Modrinth-Description.md Normal file
View File

@@ -0,0 +1,49 @@
**ScoreKeeper Plugin**
ScoreKeeper tracks player scores in configurable buckets. Use it for event points, competitions, or other server-side scoring systems, and integrate it with other plugins through the public API.
## Commands
Players can omit an optional player name to target themselves. Console and RCON must provide a player name for score get/add/subtract/reset commands.
* `/score-get [playerName]` - Displays the target player's score in their active bucket.
* `/score-add <amount>` - Adds an amount to your score in your active bucket.
* `/score-add <playerName> <amount>` - Adds an amount to the target player's score.
* `/score-subtract <amount>` - Subtracts an amount from your score in your active bucket.
* `/score-subtract <playerName> <amount>` - Subtracts an amount from the target player's score.
* `/score-reset [playerName]` - Resets the target player's active-bucket score to that bucket's initial value.
* `/score-archive` - Archives and resets your score in your active bucket.
* `/score-archive <playerName>` - Archives and resets the target player's score in their active bucket.
* `/score-archive all` - Archives and resets scores in every bucket.
* `/score-archive bucket <bucketId>` - Archives and resets every score in one bucket.
* `/score-archive-list` - Lists saved archive IDs, newest first.
* `/score-archive-list <archiveId>` - Displays the saved scores in one archive.
* `/score-bucket` - Displays your active bucket.
* `/score-bucket <bucketId>` - Switches your active bucket.
* `/score-bucket create <id> <singular> <plural> <initialValue> [reporting]` - Creates a bucket. Reporting can be `admin`, `global`, `player`, or `none` (default).
* `/score-bucket <playerName> <bucketId>` - Switches a player's active bucket.
* `/score-bucket all <bucketId>` - Changes the server's default bucket and clears individual bucket assignments.
* `/score-run start <bucketId> <topN> <reset:true|false> target <score>` - Starts a run that ends when a score reaches the target.
* `/score-run start <bucketId> <topN> <reset:true|false> duration <time>` - Starts a timed run. Use a positive number and lowercase `s`, `m`, `h`, `d`, or `w`, such as `4h`.
* `/score-run start <bucketId> <topN> <reset:true|false> until-disabled` - Starts a run with no automatic end.
* `/score-run stop <bucketId>` - Ends an active run.
## Permissions
The `scorekeeper.admin` permission (default: operators) is required for archive commands, bucket creation/administration, and high-score run management. Score get/add/subtract/reset and archive-list commands currently have no permission checks; add, subtract, and reset can target any online player.
## Features
* Create score buckets with custom singular/plural labels, initial values, and reporting policies.
* Reporting can notify operators/admins, everyone online, only the scored player, or nobody.
* Start target-score, timed, or until-disabled high-score runs with configurable top-N standings and optional score resets.
* Archive player, bucket, or all-bucket scores; archived scores reset to their bucket's initial value.
* Persist bucket definitions, assignments, scores, active runs, and archives in the plugin's data folder.
## API
Other plugins can create buckets with `createBucket(id, singular, plural, initialValue, reporting)`, use bucket-aware score methods, and start or stop high-score runs with `startTargetScoreRun`, `startTimedScoreRun`, `startUntilDisabledScoreRun`, and `stopHighScoreRun`.
## Compatibility
Built for Paper and uses Bukkit and Adventure APIs.

13
Modrinth.json Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "Score Keeper",
"url": "https://modrinth.com/plugin/scorekeeper",
"summary": "Track player scores in configurable buckets with custom reporting, high-score runs, and archives. Includes in-game commands and an API for other plugins.",
"visibility": "public",
"links": {
"issueTracker": "https://github.com/headhunter45/ScoreKeeper/issues",
"sourceCode": "https://github.com/headhunter45/ScoreKeeper",
"wikiPage": null,
"discordInvite": null,
"donationLinks": []
}
}

View File

@@ -27,9 +27,9 @@ and scoring formulas are all **future scope**. See §4 for the gap between *what
| Runtime target | Paper 1.21.7 (Bukkit + Adventure APIs) | | Runtime target | Paper 1.21.7 (Bukkit + Adventure APIs) |
| Build tool | Gradle 8.14.3 (`gradlew`) | | Build tool | Gradle 8.14.3 (`gradlew`) |
| Linting | Spotless (`googleJavaFormat()` + license header from `config/license-header.txt`) | | Linting | Spotless (`googleJavaFormat()` + license header from `config/license-header.txt`) |
| Release | `net.researchgate.release` plugin; tags `v$version`; rejects snapshot deps except paper-api | | Versioning | `org.danilopianini.git-sensitive-semantic-versioning`; minimum version `0.2.1`; reads `vX.Y.Z` tags |
| External deps | **None at runtime.** `paper-api:1.21.7-R0.1-SNAPSHOT` is `compileOnly` only. | | External deps | **None at runtime.** `paper-api:1.21.7-R0.1-SNAPSHOT` is `compileOnly` only. |
| CI/release entry point | `./gradlew spotlessCheck build` then `./gradlew release` | | CI/release entry point | Run `./gradlew spotlessCheck build`, tag the release commit (for example, `git tag -a v0.2.2 -m "Release v0.2.2"`), then rebuild to produce the stable release artifact |
### Build quickly ### Build quickly

View File

@@ -4,28 +4,34 @@
### Commands ### Commands
* `/score-get [playerName]` - Displays the player's score. For commands with an optional player name, players can omit it to target themselves. Console and RCON must provide a player name for score get/add/subtract/reset commands.
* `/score-add [playerName] <amount>` - Add amount points to the player's score.
* `/score-subtract [playerName] <amount>` - Subtracts amount points from the player's score. * `/score-get [playerName]` - Displays the target player's score in their active bucket.
* `/score-reset [playerName]` - Resets the player's score to 0. * `/score-add <amount>` - Adds an amount to your score in your active bucket.
* `/score-archive [playerName|all]` - Archives the caller/selected player or every bucket (operators); archived scores reset to their bucket's initial value. * `/score-add <playerName> <amount>` - Adds an amount to the target player's score.
* `/score-archive bucket <bucketId>` - Archives and resets all scores in one bucket (operators). * `/score-subtract <amount>` - Subtracts an amount from your score in your active bucket.
* `/score-archive-list [archiveId]` - Lists saved archive IDs or displays the scores in one archive. * `/score-subtract <playerName> <amount>` - Subtracts an amount from the target player's score.
* `/score-bucket [bucketId]` - Switches your active bucket. * `/score-reset [playerName]` - Resets the target player's score in their active bucket to that bucket's initial value.
* `/score-bucket create <id> <singular> <plural> <initialValue> [admin|global|player|none]` - Creates a bucket (operators). * `/score-archive` - Archives and resets your score in your active bucket.
* `/score-bucket <playerName|all> <bucketId>` - Switches a player or the server default (operators). * `/score-archive <playerName>` - Archives and resets the target player's score in their active bucket.
* `/score-run start <bucket> <topN> <reset:true|false> target <score>` - Starts a target-score run (operators). * `/score-archive all` - Archives and resets scores in every bucket.
* `/score-run start <bucket> <topN> <reset:true|false> duration <time>` - Starts a timed run; time uses `s`, `m`, `h`, `d`, or `w` (operators). * `/score-archive bucket <bucketId>` - Archives and resets every score in one bucket.
* `/score-run start <bucket> <topN> <reset:true|false> until-disabled` - Starts a run without automatic expiry (operators). * `/score-archive-list` - Lists saved archive IDs, newest first.
* `/score-run stop <bucket>` - Ends an active run (operators). * `/score-archive-list <archiveId>` - Displays the saved scores in one archive.
* `/score-bucket` - Displays your active bucket.
* `/score-bucket <bucketId>` - Switches your active bucket.
* `/score-bucket create <id> <singular> <plural> <initialValue> [reporting]` - Creates a bucket. Reporting is `admin`, `global`, `player`, or `none` and defaults to `none`.
* `/score-bucket <playerName> <bucketId>` - Switches a player's active bucket.
* `/score-bucket all <bucketId>` - Changes the server's default bucket and clears individual bucket assignments.
* `/score-run start <bucketId> <topN> <reset:true|false> target <score>` - Starts a run that ends when a score reaches the target.
* `/score-run start <bucketId> <topN> <reset:true|false> duration <time>` - Starts a timed run. Use a positive number followed by lowercase `s`, `m`, `h`, `d`, or `w` (for example, `4h`).
* `/score-run start <bucketId> <topN> <reset:true|false> until-disabled` - Starts a run with no automatic end.
* `/score-run stop <bucketId>` - Ends an active run.
The `scorekeeper.admin` permission (default: operators) is required for archive commands, bucket creation/administration, and high-score run management. Score get/add/subtract/reset and archive-list commands currently have no permission checks; add, subtract, and reset can target any online player.
When a player's active bucket changes, they are told the bucket name and their current score with its singular or plural unit. When a player's active bucket changes, they are told the bucket name and their current score with its singular or plural unit.
NOTES:
* All commands will use the executing player in place of [playerName] if it is omitted.
* Permissions support is coming AFTER I get archive to work.
* The commands aside from get are intended for admins and whatnot as some other plugin should be using the methods instead of letting player's execute commands.
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`; archives are saved separately in `plugins/ScoreKeeper/archives.yml`. 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`; archives are saved separately in `plugins/ScoreKeeper/archives.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. 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.

View File

@@ -27,3 +27,8 @@
| SK-05 | Done | Enable high score runs for a bucket. Admins or pugins should be able to start a run on a certain kind of score. The top n (configurable) players will have their scores reported globally for this bucket and the individual player will have their score reported to them when it changes. Scores will be optionally reset to their initialValue with the old score for this bucket saved. High score runs will have a lifetime of a target high score, a time like 4 hours or 1 week, or until-disabled. When the high score run is finished all players will be messaged a table with the top n places and their scores along with the individual user's place and score. The scores will be reset to their previous values if they were reset to their initialValue at the beginning otherwise they will be left alone. | | SK-05 | Done | Enable high score runs for a bucket. Admins or pugins should be able to start a run on a certain kind of score. The top n (configurable) players will have their scores reported globally for this bucket and the individual player will have their score reported to them when it changes. Scores will be optionally reset to their initialValue with the old score for this bucket saved. High score runs will have a lifetime of a target high score, a time like 4 hours or 1 week, or until-disabled. When the high score run is finished all players will be messaged a table with the top n places and their scores along with the individual user's place and score. The scores will be reset to their previous values if they were reset to their initialValue at the beginning otherwise they will be left alone. |
| SK-06 | Done | Score archiving. Scores either all or within a given bucket should be able to be archived and reset to their initial value. The archived scores should be able to be listed via a command. | | SK-06 | Done | Score archiving. Scores either all or within a given bucket should be able to be archived and reset to their initial value. The archived scores should be able to be listed via a command. |
| SK-07 | Ready | Replace 'net.researchgate.release' with org.danilopianini.git-sensitive-semantic-versioning' for our versioning in our build.gradle file. Turn org.gradle.configuration-cache back on after this. Our current version is 0.2.1-SNAPSHOT. Use that as our default or 0.2.1 and tag the commit to update to 0.2.2. | | SK-07 | Ready | Replace 'net.researchgate.release' with org.danilopianini.git-sensitive-semantic-versioning' for our versioning in our build.gradle file. Turn org.gradle.configuration-cache back on after this. Our current version is 0.2.1-SNAPSHOT. Use that as our default or 0.2.1 and tag the commit to update to 0.2.2. |
| SK-08 | Ready | Add JUnit 5 test infrastructure and keep the default Gradle `test` task server-free. Use an in-memory Paper test harness such as MockBukkit for plugin lifecycle and Bukkit/Paper behavior; use Mockito only for narrow API boundaries where a harness is unnecessary. |
| SK-09 | Ready | Add fast unit tests for score and bucket rules: bucket validation and duplicate IDs, initial values, UUID-isolated scores, default and per-player bucket selection, and add/subtract/reset behavior. Keep domain rules independent of a running Minecraft server. |
| SK-10 | Ready | Test YAML persistence and archives using temporary plugin data directories: score/bucket/assignment round trips, active-run state, archive contents and resets, legacy score loading, and malformed or unknown stored entries. |
| SK-11 | Ready | Test command validation and dispatch, reporting policies and messages, bucket-switch messages, and high-score run ranking/lifecycle (top-N ordering, ties, target/duration/manual finish, and score restoration). Use a controllable clock and in-memory scheduler where needed. |
| SK-12 | Ready | Add a separate Gradle `integrationTest` source set/task only for behavior that needs a real Paper server, such as loading the built plugin jar, verifying actual command registration/dispatch, and persistence across a server restart. Run it only when explicitly requested; keep it out of the normal `test` and `build` tasks. |

View File

@@ -2,12 +2,17 @@ plugins {
id 'com.diffplug.spotless' version '6.22.0' id 'com.diffplug.spotless' version '6.22.0'
id 'java-library' id 'java-library'
id 'maven-publish' id 'maven-publish'
id 'net.researchgate.release' version '3.1.0' id 'org.danilopianini.git-sensitive-semantic-versioning' version '7.0.24'
} }
group = 'com.majinnaibu.minecraft.plugins' group = 'com.majinnaibu.minecraft.plugins'
description = "ScoreKeeper" description = "ScoreKeeper"
gitSemVer {
minimumVersion.set('0.2.1')
versionPrefix.set('v')
}
tasks.withType(JavaCompile).configureEach { tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
// options.compilerArgs << "-Xlint:deprecation" // options.compilerArgs << "-Xlint:deprecation"
@@ -41,10 +46,12 @@ tasks.named('updateDaemonJvm') {
languageVersion = JavaLanguageVersion.of(25) languageVersion = JavaLanguageVersion.of(25)
} }
def pluginVersion = project.version.toString()
processResources { processResources {
inputs.property "version", project.version inputs.property "version", pluginVersion
filesMatching('plugin.yml') { filesMatching('plugin.yml') {
expand(project.properties) expand(version: pluginVersion)
} }
} }
@@ -56,18 +63,6 @@ publishing {
} }
} }
release {
// buildTasks.addAll(['spotlessCheck', 'build'])
buildTasks = ['spotlessCheck', 'build']
failOnSnapshotDependencies = true
ignoredSnapshotDependencies = [
"io.papermc.paper:paper-api"
]
revertOnFail = true
tagTemplate = 'v$version'
versionPropertyFile = 'gradle.properties'
}
repositories { repositories {
mavenCentral() mavenCentral()
maven { url = 'https://repo.papermc.io/repository/maven-public/' } maven { url = 'https://repo.papermc.io/repository/maven-public/' }

View File

@@ -1,7 +1,6 @@
version=0.2.2-SNAPSHOT
org.gradle.java.installations.auto-download=true org.gradle.java.installations.auto-download=true
org.gradle.java.installations.auto-detect=false org.gradle.java.installations.auto-detect=false
org.gradle.java.installations.fromEnv=JAVA_HOME org.gradle.java.installations.fromEnv=JAVA_HOME
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.configuration-cache=false org.gradle.configuration-cache=true