Documentation Index
Fetch the complete documentation index at: https://docs.mclicense.org/llms.txt
Use this file to discover all available pages before exploring further.
Adding the library
We offer two ways to add MC License to your plugin: Option 1 — Dependency (recommended) Add the following repository and dependency to your build file:MCLicense.java or MCLicense.kt into your project. No shading needed — all required dependencies are already on the Paper server classpath at runtime.
With the single-class approach you’ll need to manually check that repo for updates, rather than just bumping a version number in your build file.
Checking a license
Each license check requires two things: thepluginId and the license key. The pluginId is a unique identifier for your plugin, and the license key is the key that the user has set in the mclicense.txt file in your plugin’s folder (the library will create this file).
You’ll need the pluginId for the validate function. To find it, head to the plugin on your dashboard and copy the random string of characters from the URL. It’ll look something like this: 3gd7u9r4 (8 characters).
To validate a license in your plugin, simply add the following code snippet to your onEnable:
validateKey function returns a Boolean. In the above code snippet, if the key is invalid, the plugin will be disabled. If the key is valid, the plugin will continue to load.
The library will handle the console logging for you, whether successful or rejected.

