A starter template for Paper plugins. It comes with:
- Cloud for annotation-based commands
- InvUI for inventory GUIs
- Shadow, so dependencies are bundled and relocated into the plugin jar
- run-paper, to start a test server with one command
settings.gradle.kts: setrootProject.nameto your plugin's name (lowercase).gradle.properties: setgroup,version, and bump any versions you need.- Package: rename
src/main/java/dev/starnova/boilerplateto match<group>/<name>. - Main class: rename
Boilerplate.javaif you want. If you do, updatemain:insrc/main/resources/plugin.yml. plugin.yml: changewebsite(and addauthors,description, and so on).- Delete or replace the example command (
command/) and GUI (gui/).
The plugin name, version and main package in plugin.yml are filled in from Gradle automatically.
./gradlew build # jar ends up in build/libs/
./gradlew runServer # starts a test Paper server with the plugin loadedRequires a JDK matching javaVersion in gradle.properties (21 by default) to be installed.
Add the version to gradle.properties and the dependency to build.gradle.kts. Use implementation for anything that should be bundled into the jar, and add a relocate(...) line in shadowJar for it. Use compileOnly for anything another plugin or the server already provides.