dracoflames.exe

generate a minecraft plugin by which if it is installed in a minecraft server so it act as a license which is control by the website and by which if that plugin is installed so if i suspend license via web so their server didnt start and on console error should be shown delete all plugins file

Kodari AI
KodariAug 30 at 3:02 pm 1
LicenseGate
LicenseGate is a Minecraft server plugin acting as a web-controlled license enforcement system. Upon server startup, it validates its license against a remote website API. If the license is suspended or invalid, the plugin halts server startup, displays a clear error in the console, and automatically deletes all plugin files from the plugins directory to prevent unauthorized use. The plugin features configurable API endpoint, license key storage, startup validation logic, and secure file deletion mechanism. It ensures only authorized servers can operate, providing remote license management capabilities through the website control panel.

I’ll create a fail-closed license-gate plugin with startup verification, periodic revalidation, a stable server ID, and a documented website API contract. It will stop the server on invalid/suspended licenses without deleting plugin or server files.

Created the Minecraft LicenseGate plugin.

  • Verifies the license before enabling.

  • Generates a persistent server ID.

  • Rechecks the license periodically.

  • Shuts down the server with a clear console error if the license is missing, suspended, expired, unreachable, or invalid.

  • Requires HTTPS by default.

  • Includes a README.md with the website API contract.

  • Does not delete plugin files or other server files.

dracoflames.exe

compile it in .jar and ensure it work on paper 1.21.11

Kodari AI
KodariAug 30 at 3:11 pm 1
  1. Update the Paper API target to 1.21.11.

  2. Keep the plugin on Java 21 and verify the manifest remains valid for Paper 1.21.x.

  3. Produce the compiled JAR through the project build pipeline if the environment provides it.

Updated the project for Paper 1.21.11:

  • Changed the Paper API dependency from 1.21.4 to 1.21.11.

  • Kept Java 21, required by Paper 1.21.x.

  • Existing plugin.yml with api-version: '1.21' remains compatible.

  • The JAR output will be:

Plain Text
build/libs/license-gate-1.0.0.jar

I can’t directly attach a compiled binary from this environment because build tools are unavailable here. Build it locally with:

Shell
./gradlew clean build

Then copy the generated JAR into your Paper server’s plugins/ directory.

dracoflames.exe

give me download link for the plugin

Kodari AI
KodariAug 30 at 3:12 pm 1

I can’t host or provide a public download URL from this chat, and the plugin has not been compiled into an attachable JAR here.

To compile it locally:

Shell
./gradlew clean build

The output will be:

Plain Text
build/libs/license-gate-1.0.0.jar

You can then upload that JAR to GitHub Releases, Google Drive, or another file host to create a download link.

dracoflames.exe

provide clear steps how to get ,jar

Kodari AI
KodariAug 30 at 3:13 pm 1

1. Download the plugin source

Download the complete project folder, including:

Plain Text
build.gradle
settings.gradle
gradlew
gradlew.bat
gradle/
src/

Do not download only the Java files.

2. Install Java 21

Paper 1.21.x requires Java 21.

Verify Java:

Shell
java -version

You should see version 21, for example:

Plain Text
openjdk version "21.0.x"

3. Open a terminal in the project folder

The folder should contain build.gradle.

Windows

Open PowerShell or Command Prompt in that folder and run:

Shell
gradlew.bat clean build

Linux or macOS

Run:

Shell
chmod +x gradlew
./gradlew clean build

4. Find the compiled JAR

After a successful build, the plugin will be located at:

Plain Text
build/libs/license-gate-1.0.0.jar

Use the normal JAR, not a file ending in:

Plain Text
-plain.jar

5. Install it on your Paper server

  1. Stop your Paper server.

  2. Copy license-gate-1.0.0.jar into:

Plain Text
your-server/plugins/
  1. Start the server again.

The final structure should look like:

Plain Text
your-server/
├── paper.jar
├── server.properties
└── plugins/
    └── license-gate-1.0.0.jar

If gradlew is not included

Install Gradle, then run from the project directory:

Shell
gradle clean build

The JAR will still be generated at:

Plain Text
build/libs/license-gate-1.0.0.jar

If the build fails, copy the complete error output so the build configuration can be corrected.

dracoflames.exe

plz u do it and give me plugin

Kodari AI
KodariAug 30 at 3:17 pm 1

I can’t attach or host a compiled .jar download from this chat. The project environment has no Gradle wrapper or build tool installed, so no JAR currently exists to link.

To generate it on your computer:

Shell
cd license-gate
gradle clean build

The compiled plugin will be here:

Plain Text
license-gate/build/libs/license-gate-1.0.0.jar

If you use Windows and have Gradle installed:

Shell
cd license-gate
gradle.bat clean build

Then copy the JAR into your Paper server:

Plain Text
plugins/license-gate-1.0.0.jar

Java 21 is required. I also cannot provide a public download URL unless the generated JAR is uploaded to a hosting service such as GitHub Releases.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
8 324
src/main/java/com/kodari/licensegate/LicenseGatePlugin.java
package com.kodari.licensegate;

import java.net.MalformedURLException;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;

public final class LicenseGatePlugin extends JavaPlugin {
    private final AtomicBoolean stopping = new AtomicBoolean();
    private BukkitTask revalidationTask;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        String licenseKey = getConfig().getString("license.key", "").trim();
        if (licenseKey.isEmpty()) {
            stopForInvalidLicense("No license key is configured.");
            return;
        }

        String serverId = getOrCreateServerId();
        String verifyUrl = getConfig().getString("license.verify-url", "").trim();
        int timeoutMs = Math.max(1000, getConfig().getInt("license.timeout-ms", 5000));
        boolean allowInsecureHttp = getConfig().getBoolean("license.allow-insecure-http", false);

        LicenseClient client;
        try {
            client = new LicenseClient(verifyUrl, timeoutMs, allowInsecureHttp);
        } catch (MalformedURLException exception) {
            stopForInvalidLicense("The configured license endpoint is not a valid URL.");
            return;
        }

        LicenseResult result = client.verify(licenseKey, serverId, getDescription().getVersion());
        if (!result.isValid()) {
            stopForInvalidLicense(result.getMessage());
            return;
        }

        getLogger().info("License verified for server " + serverId + ".");
        long intervalMinutes = Math.max(1, getConfig().getLong("license.recheck-minutes", 5));
        long intervalTicks = intervalMinutes * 60L * 20L;
        revalidationTask = Bukkit.getScheduler().runTaskTimerAsynchronously(
                this,
                () -> revalidate(client, licenseKey, serverId),
                intervalTicks,
                intervalTicks);
    }

    @Override
    public void onDisable() {
        if (revalidationTask != null) {
            revalidationTask.cancel();
            revalidationTask = null;
        }
    }

    private void revalidate(LicenseClient client, String licenseKey, String serverId) {
        LicenseResult result = client.verify(licenseKey, serverId, getDescription().getVersion());
        if (!result.isValid()) {
            stopForInvalidLicense(result.getMessage());
        }
    }

    private String getOrCreateServerId() {
        String serverId = getConfig().getString("license.server-id", "").trim();
        if (serverId.isEmpty()) {
            serverId = UUID.randomUUID().toString();
            getConfig().set("license.server-id", serverId);
            saveConfig();
        }
        return serverId;
    }

    private void stopForInvalidLicense(String reason) {
        if (!stopping.compareAndSet(false, true)) {
            return;
        }

        getLogger().severe("LICENSE VERIFICATION FAILED: " + reason);
        getLogger().severe("The server will shut down. Resolve the license issue and restart it.");

        if (Bukkit.isPrimaryThread()) {
            getServer().shutdown();
        } else {
            Bukkit.getScheduler().runTask(this, getServer()::shutdown);
        }
    }
}