Add player stat collection with pluggable YAML/MySQL storage
CI / build (push) Successful in 1m58s

Tracks races played, wins, total laps, and best times per player and
per race, recorded off the main thread after each finish. Backed by
a StatsStorage interface with two implementations: the default
YamlStatsStorage (stats.yml, zero setup) and MySqlStatsStorage
(HikariCP-pooled, auto-creates its tables, configured via
config.yml). MySQL init failures fall back to YAML rather than
blocking plugin startup. Adds /boatparty stats and /boatparty top
commands. Bundles and relocates HikariCP + MySQL Connector/J via
shadow (bumped to 9.0.2, the prior 8.3.5 couldn't shade Java 25
class files).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
Michael Burgess
2026-08-08 09:00:13 -04:00
co-authored by Claude Sonnet 5
parent d6f1f53681
commit b56d4b064b
12 changed files with 581 additions and 11 deletions
+11 -1
View File
@@ -1,6 +1,6 @@
plugins {
java
id("com.gradleup.shadow") version "8.3.5"
id("com.gradleup.shadow") version "9.0.2"
}
group = "us.tss3.boatparty"
@@ -19,6 +19,9 @@ repositories {
dependencies {
compileOnly("io.papermc.paper:paper-api:26.2.build.111-stable")
implementation("com.zaxxer:HikariCP:7.1.0")
implementation("com.mysql:mysql-connector-j:26.7.0")
}
tasks {
@@ -36,6 +39,13 @@ tasks {
shadowJar {
archiveClassifier.set("")
archiveBaseName.set("BoatParty")
relocate("com.zaxxer.hikari", "us.tss3.boatparty.libs.hikari")
relocate("com.mysql", "us.tss3.boatparty.libs.mysql")
minimize {
exclude(dependency("com.mysql:mysql-connector-j:.*"))
}
}
build {