Getting Started
This tutorial takes you from a clean clone to a running local server with all modules active. By the end you will have verified the plugin loads, seen the startup summary, reloaded the config live, and run the test suite.
Prerequisites
| Requirement | Version |
|---|---|
| Java | 25 |
| Git | any |
No other tools are needed. Gradle and the Paper server are downloaded automatically.
1. Clone and navigate
git clone https://forgejo.officeryoda.dev/OfficerYoda/kreiscraft-java.gitcd kreiscraft-javaAll remaining commands in this tutorial are run from that directory.
2. Install the Git hook
./gradlew installGitHooksThis copies scripts/pre-commit into .git/hooks/. The hook runs spotlessCheck on every staged .java file before a commit is accepted. Installing it now means you will never push code that fails the formatter check.
Expected output:
BUILD SUCCESSFUL3. Build the plugin
./gradlew buildGradle compiles the sources, runs the test suite, and creates a fat jar via the Shadow plugin. The output artifact is:
build/libs/Kreiscraft-0.1.0-SNAPSHOT.jarAll third-party libraries (Configurate, Javalin, InvUI, etc.) are relocated into the de.kreiscraft.libs.* namespace inside that jar so they cannot conflict with other plugins.
4. Start a local server
./gradlew runServerThe run-paper Gradle plugin downloads a Paper server on first run and places everything under run/. Subsequent starts reuse the cached download.
On first run you will see Paper bootstrap output followed by plugin startup. Look for the [Kreiscraft] prefix in the log. The last line from the plugin is the startup summary:
[Kreiscraft] [INFO] 19 Module aktiv, 5 deaktiviert, 0 fehlgeschlagen.If you have configured the language to en (in config.yml → core.language: en) it reads:
[Kreiscraft] [INFO] 19 modules enabled, 5 disabled, 0 failed.The counts come from StartupSummary — enabled modules are those with enabled: true in config.yml under modules.<id>. The bundled config.yml ships 19 modules enabled; effects, firework, glow, plugin-hider and positions are disabled by default and only start when explicitly opted in, so a clean run reports 19 enabled and 5 disabled.
If any module fails to start, the log also prints a SEVERE line with the module id and exception before the summary. Check that line first when troubleshooting.
The server is ready when you see:
Done (Xs)! For help, type "help"5. Verify the plugin loaded
Beyond the startup summary, you can inspect the server console directly. Type:
pluginsYou should see Kreiscraft listed as enabled (green in Paper’s colorized output).
6. Run a live reload
In the server console (or from a Minecraft client connected to localhost:25565 with op), run:
/kreiscraft reloadThis command requires the kreiscraft.admin permission, which ops hold by default. It triggers:
ConfigService.reload()— re-readsconfig.ymlfrom disk.MessageService.reload()— re-reads the active lang file.ModuleRegistry.reloadConfigs()— callsonConfigReload()on every enabled module.
On success you will see:
[Kreiscraft] Konfiguration neu geladen.(or the English variant if core.language: en).
7. Run the tests
Stop the server (stop in the console or Ctrl-C), then:
./gradlew testThe test suite uses MockBukkit, JUnit Jupiter, Mockito, and AssertJ. Tests do not spin up a real server — MockBukkit provides an in-memory Bukkit environment. A MockScheduler test-double stands in for the Bukkit scheduler.
Expected output:
BUILD SUCCESSFULX tests completed, 0 failedIf tests fail, Gradle writes HTML reports to build/reports/tests/test/index.html.
What you have now
- A working local dev loop: edit →
./gradlew build→./gradlew runServer. - A pre-commit hook that prevents formatting regressions.
- A passing test suite as a baseline.
Continue with Your First Module to learn how to add a new feature.