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)
- Tests against a stub server, a GitHub Actions workflow and an
AGENTS.mdthat tells AI assistants how to work in it without weakening the check
Get started
- In the dashboard, create a product and a policy (machines = servers), and an API key.
- Use the template on GitHub (Use this template), rename
com.example.myplugin, and put the key in~/.gradle/gradle.propertiesassunlicenseApiKey=slk_...(never in git). ./gradlew build, or./gradlew runServerfor a local Paper server with the plugin.- Put your features in
MyPlugin.startFeatures(): it runs once the license is valid.
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.
