N

Create a Spigot 1.21.11 plugin with the following features:

  • Add a command: /crystalkit.
  • When a player executes /crystalkit, the plugin should automatically run another command.
  • The command that is executed must be configurable in config.yml so server owners can change it without recompiling the plugin.
  • The command should support placeholders such as %player% (or the player's name) so it runs as the player who used /crystalkit.
  • The plugin must include a permission node (for example, crystalkit.use).
  • The /crystalkit command should only be visible and usable by players who have the required permission, making it compatible with LuckPerms.
  • The plugin should be fully compatible with Spigot 1.21.11.
Kodari AI
KodariJul 8 at 8:30 pm 1
CrystalKit
A lightweight Spigot plugin that executes a configurable command when a player runs /crystalkit. Supports permission-based access with the crystalkit.use permission node and %player% placeholder for dynamic command execution. Fully compatible with LuckPerms and Spigot 1.21.11.

I’ll create the CrystalKit plugin with a simple, clean structure: main class, command executor, and config.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
5 106
src/main/java/com/crystalkit/CrystalKit.java
package com.crystalkit;

import com.crystalkit.commands.CrystalKitCommand;
import org.bukkit.plugin.java.JavaPlugin;

public class CrystalKit extends JavaPlugin {

    @Override
    public void onEnable() {
        saveDefaultConfig();
        CrystalKitCommand executor = new CrystalKitCommand(this);
        getCommand("crystalkit").setExecutor(executor);
        getCommand("crystalkit").setTabCompleter(executor);
        getLogger().info("CrystalKit enabled.");
    }

    @Override
    public void onDisable() {
        getLogger().info("CrystalKit disabled.");
    }
}