Iqra Ambareen

PROJECT: DIGITAL RANK MAKER

Act as a senior Java developer, Minecraft Paper/Bukkit plugin engineer, permissions-system developer, and software build specialist.

Create a complete, functional, professional Minecraft rank management plugin named Digital Rank Maker (DRM).

  1. Plugin Information
  • Plugin Name: Digital Rank Maker
  • Plugin Version: 1.0.0
  • Target Minecraft Versions: 26.2 and 26.3
  • Server Software: Paper/Bukkit
  • Programming Language: Java
  • Build System: Maven
  • Main Purpose: Create and manage custom ranks, prefixes, permissions, command access, and placeholders.

Ensure compatibility with the requested server versions using the appropriate available Java and Paper API versions. Do not claim compatibility unless the project compiles against the appropriate APIs.

  1. Main Features

Create a fully functional rank management system that allows server administrators to:

  • Create unlimited custom ranks, such as Owner, Admin, Moderator, VIP, and Member.
  • Assign ranks to players.
  • Configure rank prefixes using commands.
  • Add and remove permissions from ranks.
  • Control which commands players can execute based on their rank.
  • Support configurable placeholders through PlaceholderAPI.
  • Save all ranks and player assignments permanently.
  • Load rank data automatically when the server starts.
  • Update changes immediately without requiring a server restart.
  • Provide tab completion, helpful error messages, and permission checks.
  • Prevent unauthorized players from managing ranks.
  • Include clear documentation and example configurations.
  1. Commands

Implement the following commands under "/drm".

Create a rank "/drm create <rank-name>"

Creates a new rank and its required configuration folder and files.

Give a rank to a player "/drm give <rank-name> <player-name>"

Assigns the specified rank to the target player and saves the assignment persistently.

Add a permission to a rank "/drm perm add <rank-name> <permission>"

Adds a permission node to the selected rank.

Remove a permission from a rank "/drm perm remove <rank-name> <permission>"

Removes a permission node from the selected rank.

Delete a rank "/drm delete <rank-name>"

Deletes the selected rank after validating the request. Warn the administrator if players still have the rank and provide a safe handling method for their assignments.

Enable command access for a rank "/drm give cmd access <rank-name>"

Enables the command-access management feature for the specified rank. This command must have a clearly defined purpose and must not automatically grant unrestricted access to every server command.

Also implement: "/drm give cmd access <rank-name> <command>"

Allows the selected rank to access a specific command.

"/drm give cmd remove <rank-name> <command>"

Removes access to a specific command from the selected rank.

Set a rank prefix "/drm prefix set <rank-name> <prefix>"

Sets the rank's prefix and saves it in that rank's "prefix.yml" file. Support Minecraft color codes, including legacy codes such as "&6", and modern formatting supported by the target API.

Additional commands

  • "/drm list" — Lists all available ranks.
  • "/drm info <rank-name>" — Displays rank information.
  • "/drm reload" — Reloads plugin configurations and rank data.
  • "/drm help" — Displays command usage.

Provide correct argument validation, tab completion, console support where appropriate, and useful success or error messages.

  1. Required Folder Structure

This is a critical requirement. All ranks must be stored inside a folder named "Rank", located in the plugin's data directory.

The "Rank" directory must contain a separate folder for each rank, not a YAML file for each rank.

Example:

plugins/ └── DigitalRankMaker/ ├── config.yml ├── players.yml ├── ranks/ │ └── Owner/ │ ├── prefix.yml │ ├── permissions.yml │ └── config.yml └── Rank/ ├── Owner/ │ ├── prefix.yml │ ├── permissions.yml │ └── config.yml ├── Admin/ │ ├── prefix.yml │ ├── permissions.yml │ └── config.yml └── Moderator/ ├── prefix.yml ├── permissions.yml └── config.yml

Use "Rank/" as the single canonical rank storage directory. Do not create a second "ranks/" directory; the example above illustrates the required layout, and the final implementation must use only "Rank/".

Whenever "/drm create <rank-name>" is executed, create a new directory for that rank containing exactly these three files:

  1. "prefix.yml"
  2. "permissions.yml"
  3. "config.yml"

Each file must have a clear purpose.

prefix.yml

Stores the rank's display prefix.

Example:

prefix: "&6[Owner] "

The "/drm prefix set" command must update this file.

permissions.yml

Stores permissions assigned to the rank and its command-access rules.

Example:

permissions: - "example.permission"

command-access: enabled: true allowed: - "spawn" - "home"

Use a reliable and documented permission integration rather than relying on configuration files alone to enforce permissions.

config.yml

Stores general rank settings.

Example:

rank: name: "Owner" enabled: true priority: 100

Include any additional rank-specific settings required by the implementation.

  1. Main Configuration

Create a global "config.yml" inside "plugins/DigitalRankMaker/".

It should include configurable options for:

  • Default rank.
  • Prefix formatting.
  • Rank inheritance, if implemented.
  • Placeholder support.
  • Message formatting.
  • Permission integration.
  • Command-access rules.
  • Debug logging.
  • Automatic configuration saving.

Include comments explaining every option and provide sensible defaults.

  1. Player Rank Storage

Create "players.yml" or another appropriate persistent storage system.

Store each player's UUID and assigned rank. Use UUIDs instead of player names as the primary identifier so rank assignments remain valid when usernames change.

Support offline player assignments where possible. Validate rank names before assigning them.

  1. Permissions and Command Security

Implement a secure permissions system.

  • Only authorized administrators can create, delete, modify, or assign ranks.
  • Register plugin permissions such as "digitalrankmaker.admin" and "digitalrankmaker.use".
  • Ensure command restrictions are actually enforced by the server integration.
  • Do not assume that listing a permission in "permissions.yml" automatically grants or revokes it through Bukkit.
  • Integrate with a compatible permissions provider, such as LuckPerms, or implement a clearly documented permission attachment system.
  • Do not override server operator permissions or bypass other security plugins.
  • Never allow rank users to grant themselves administrator access through an unrestricted command.
  • Handle conflicting permissions and command restrictions safely.
  1. PlaceholderAPI Integration

Provide optional PlaceholderAPI support.

Implement placeholders such as:

  • "%drm_rank%" — Player's rank name.
  • "%drm_prefix%" — Player's rank prefix.
  • "%drm_rank_prefix%" — Equivalent rank-prefix placeholder.
  • "%drm_has_rank_<rank>%" — Whether the player has the specified rank.

Return safe, documented fallback values when a player has no assigned rank. Register placeholders correctly and avoid requiring PlaceholderAPI when it is not installed.

  1. Messages and User Experience

Make all messages configurable in the global configuration.

Provide clear messages for successful operations, missing ranks, invalid arguments, insufficient permissions, and configuration errors.

Support color formatting and clean command output. Add tab completion for rank names, online players, permission subcommands, and supported command-access arguments.

  1. Technical Requirements
  • Use a clean, modular Java architecture.
  • Register commands, listeners, permissions, and optional integrations correctly.
  • Use safe YAML loading and saving.
  • Validate rank names to prevent path traversal and invalid folder names.
  • Handle missing or corrupted configuration files gracefully.
  • Avoid data loss during reloads and rank deletion.
  • Prevent duplicate ranks and invalid player assignments.
  • Save changes reliably.
  • Include "plugin.yml" or the appropriate plugin metadata for the selected Paper/Bukkit API.
  • Do not use fictional API methods, placeholder implementations, or pseudocode in the final project.
  • Include all required source files and build configuration.
  1. Final Deliverables

Generate a complete Maven project containing:

  • All Java source files.
  • Maven "pom.xml".
  • Plugin metadata.
  • Default configuration files.
  • Rank folder and YAML file generation logic.
  • PlaceholderAPI integration.
  • Permission and command-access enforcement.
  • README with setup instructions and all commands.
  • Instructions for compiling the project into a working ".jar" file.

Final objective: Deliver a buildable, functional Digital Rank Maker plugin for the requested Paper/Bukkit versions, with folder-based rank storage, configurable prefixes, permissions, command access, and PlaceholderAPI support.

Do not stop after generating a plan or example code. Produce the complete project, compile it against the appropriate available API, and resolve build errors before declaring it complete. If the exact requested Minecraft API versions are unavailable, clearly explain the limitation rather than falsely claiming compatibility.

Kodari AI
KodariOct 28 at 9:28 am 2
DigitalRankMaker
Digital Rank Maker is a comprehensive Minecraft Paper/Bukkit plugin for creating and managing custom ranks. It features folder-based rank storage with separate prefix, permissions, and config YAML files per rank. Administrators can create unlimited ranks, assign them to players via UUID, configure colored prefixes, manage permissions and command access, and integrate with PlaceholderAPI. The plugin provides secure permission enforcement, tab completion, configurable messages, and persistent player data storage. It supports reload functionality and automatic configuration saving for a complete rank management solution.
  1. Build the Maven project against the available Paper 26.2 API, targeting Java 25.

  2. Implement folder-based ranks, UUID assignments, permission attachments, command restrictions, and optional PlaceholderAPI support.

  3. Add plugin metadata, commented defaults, and setup/command documentation.

Created the Maven project for Digital Rank Maker with UUID-based player assignments, the canonical Rank/<name>/ folder structure, configurable prefixes, Bukkit permission attachments, rank command allowlists, and optional PlaceholderAPI placeholders. It includes the default configuration, plugin metadata, and README documentation.

The project targets Java 25 and Paper API 26.2.build.135-stable. Paper’s repository metadata showed a stable 26.2 API but only pre-release metadata for 26.3, so 26.3 compatibility is not verified or claimed. I did not run a Maven build in this session, so I can’t confirm a successful jar build.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
10 1,303
src/main/java/dev/digitalrankmaker/DigitalRankMakerPlugin.java
package dev.digitalrankmaker;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.IOException;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class DigitalRankMakerPlugin extends JavaPlugin {
    private static final Pattern HEX_COLOR = Pattern.compile("&#([A-Fa-f0-9]{6})");
    private RankManager rankManager;
    private DrmExpansion expansion;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        rankManager = new RankManager(this);
        try {
            rankManager.load();
        } catch (IOException exception) {
            getLogger().log(java.util.logging.Level.SEVERE, "Could not initialize rank storage.", exception);
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        getServer().getPluginManager().registerEvents(new RankListener(this), this);
        DrmCommand commandHandler = new DrmCommand(this);
        PluginCommand drmCommand = getCommand("drm");
        if (drmCommand == null) {
            getLogger().severe("The drm command is missing from plugin.yml.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        drmCommand.setExecutor(commandHandler);
        drmCommand.setTabCompleter(commandHandler);

        if (getConfig().getBoolean("placeholder-support.enabled", true)
                && Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            expansion = new DrmExpansion(this);
            expansion.register();
        }
        getLogger().info("Digital Rank Maker enabled with " + rankManager.getRanks().size() + " rank(s).");
    }

    @Override
    public void onDisable() {
        if (expansion != null) {
            expansion.unregister();
        }
    }

    public RankManager getRankManager() {
        return rankManager;
    }

    public void reloadPluginData() throws IOException {
        reloadConfig();
        rankManager.load();
        if (expansion != null && !getConfig().getBoolean("placeholder-support.enabled", true)) {
            expansion.unregister();
            expansion = null;
        } else if (expansion == null && getConfig().getBoolean("placeholder-support.enabled", true)
                && Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            expansion = new DrmExpansion(this);
            expansion.register();
        }
    }

    public void sendMessage(CommandSender sender, String messageKey, Map<String, String> replacements) {
        String prefix = getConfig().getString("messages.prefix", "&8[&bDRM&8] &r");
        String message = getConfig().getString("messages." + messageKey, "&cMessage unavailable: " + messageKey);
        for (Map.Entry<String, String> entry : replacements.entrySet()) {
            message = message.replace("{" + entry.getKey() + "}", entry.getValue());
        }
        sender.sendMessage(colorize(prefix + message));
    }

    public String colorize(String message) {
        Matcher matcher = HEX_COLOR.matcher(message);
        StringBuffer converted = new StringBuffer();
        while (matcher.find()) {
            String hex = matcher.group(1);
            StringBuilder legacyHex = new StringBuilder("§x");
            for (char character : hex.toCharArray()) {
                legacyHex.append('§').append(character);
            }
            matcher.appendReplacement(converted, Matcher.quoteReplacement(legacyHex.toString()));
        }
        matcher.appendTail(converted);
        return ChatColor.translateAlternateColorCodes('&', converted.toString());
    }
}