Skip to content

Paper plugin template ​

A complete Minecraft (Paper) plugin with SunLicense built in, to copy and build on: github.com/sunlicense-com/example-paper-plugin (MIT No Attribution: copy any of it without credit).

  • Gradle + Shadow, with the Java SDK relocated into your own package
  • The license key from config.yml, or built in by BuiltByBit and Voxel Shop placeholders
  • A clear console message for every result code, keys masked
  • A re-check every few hours, so revoking a leaked key reaches running servers
  • An offline license fallback, and the plugin keeps running if SunLicense can't be reached (your choice)
  • A sealed core in release builds: only a valid license runs your features, and modified copies are reported
  • Tests against a stub server, a GitHub Actions workflow and an AGENTS.md that tells AI assistants how to work in it without weakening the check

Get started ​

  1. In the dashboard, create a product and a policy (machines = servers), and an API key.
  2. Use the template on GitHub (Use this template), rename com.example.myplugin, and put the key in ~/.gradle/gradle.properties as sunlicenseApiKey=slk_... (never in git).
  3. ./gradlew build, or ./gradlew runServer for a local Paper server with the plugin.
  4. Put your features in core/CoreFeatures.java: they start once the license is valid.
  5. For the jar you sell: ./gradlew build -PsunlicenseProduct=<your product code> (with the CLI signed in) writes build/release/…jar, where the core is sealed so only a valid license runs it, the other classes are checked for tampering, and an ownership notice is logged at start-up (protection).

The template's README covers the details: selling on each store, the offline file, what server owners see.

Testing with your own license

Each test server takes one of the license's machine slots. Use a test license with a higher machine limit, or free slots from the license page.

Send feedback

Found something broken, or have an idea? It goes straight to our board.

The first line becomes the title.
Images (optional, up to 5: paste, drop or capture)
Check each image before sending, and remove any that show something private.

We also receive this page's address and your browser version.

Ctrl Enter to send