Repository navigation
Development
-
JDK 25 (Gradle toolchain). The plugin is compiled for Java 21 (
--release 21). - Gradle is provided by the wrapper (
./gradlew).
./gradlew build # compile (warnings are errors), run the tests, jar in build/libs/
./gradlew runServer # start a local Paper test server with the plugin
./gradlew runServer -PrunDir=/path/to/server # reuse an existing test server directory
./scripts/smoke-test.sh # build, start a clean Paper server, check the plugin enabled without errors, stop itThe release artifact is the shadow jar (build/libs/JustLogs-<version>.jar). Only bStats is shaded (relocated to me.skerik.justlogs.libs.bstats). SQLite, MariaDB and HikariCP are listed in src/main/resources/libraries.txt and downloaded by JustLogsLoader (a Paper PluginLoader) on the first start.
Code compiles with -Xlint:all -Werror: no deprecated API without an explicit, commented suppression.
All versions live in gradle.properties:
| Property | Meaning |
|---|---|
pluginVersion |
Plugin version |
paperApiVersion |
Oldest supported Paper API (compiled against it) |
apiVersion |
api-version in paper-plugin.yml
|
minecraftVersion |
Version for runServer and Modrinth |
bstatsId |
bStats plugin id (0 = no metrics in this build) |
sqliteVersion, mariadbVersion, hikariVersion
|
Runtime libraries |
./gradlew testUnit tests cover the query parser, the SQL query compiler, migrations, the batch writer, container storage, rollback planning, config updates and message files.
There is also an optional MariaDB/MySQL integration test. It runs only when JL_TEST_MARIADB is set, and it drops every jl_ table in that database, so point it at a throwaway one:
JL_TEST_MARIADB=127.0.0.1:3306/justlogs_test \
JL_TEST_MARIADB_USER=root JL_TEST_MARIADB_PASSWORD=secret \
./gradlew testPackage me.skerik.justlogs:
| Package | Contents |
|---|---|
| (root) |
JustLogs (startup order), JustLogsLoader (library download), Context, Scheduler / PaperScheduler (Folia-safe scheduling) |
command |
/justlogs (Brigadier), lookup service, result paging, rendering, tab completion |
config |
Settings, Messages, ConfigUpdater
|
inspect |
Inspector mode |
listener |
Block, nature (fire, explosions, growth, mobs) and container listeners, CauseTracker (who lit what) |
model |
Action, Category, Actor, records |
query |
QueryParser, LogQuery, ActionGroups, Radius
|
queue |
In-memory LogQueue and the BatchWriter thread |
rollback |
Planning (RollbackPlan, ContainerPlan), applying chunk by chunk, RollbackService
|
storage |
Database (HikariCP), Migrations, QueryCompiler (query to SQL), id cache, stores |
util |
Durations, keys, HMAC, secrets, update checker, bStats, banner |
-
onEnable(main thread, fast): config and its automatic update, settings, messages, scheduler, command registration. - Async: open the database, run migrations, load the id cache, start the writer.
- First tick: build the
Context, register listeners (nothing is logged before the writer exists), start timers, print the banner.
A fatal problem (database unreachable) logs one clear line and disables the plugin.
These come from the release checklist (docs/RELEASE_CHECKLIST.md):
-
New config option: add it to
config.ymlwith a comment, raiseconfig-version, extendConfigUpdaterTest. -
Schema change: append a new version to
Migrations.VERSIONS. Never edit or reorder an old one, and add an upgrade test. -
New action: append to
Actionwith a new id. Never change or reuse an id; they are stored in the database. -
New message key: add it to
messages_en.ymland every bundled locale (MessagesFilesTestchecks this). -
Threads: no blocking I/O on the main thread; schedule everything through
Schedulerso Folia keeps working. - Update
CHANGELOG.md.
- Go through
docs/RELEASE_CHECKLIST.md. - Set
pluginVersioningradle.propertiesand add a## <version>section toCHANGELOG.md(the build fails without it). - Push a tag
vX.Y.Z. TheReleaseworkflow runs the smoke test, creates a GitHub Release with the jar and the changelog section, and publishes to Modrinth (MODRINTH_TOKENsecret). - SpigotMC is uploaded by hand (description in
docs/spigot.bbcode.txt).
Every push to main and every pull request runs the Build workflow (build, tests, smoke test) and uploads the jar as an artifact.
- Open an issue before larger changes.
- Keep pull requests focused and update
CHANGELOG.md. - Contributions are licensed under MIT.
- Security issues: report privately through GitHub's "Report a vulnerability", not as a public issue.
Getting started
Using it
Server admin
More