realprinario-ctrl

Build Request — Slayers Plugin for Minecraft 1.21.11

You are an expert Minecraft Java plugin developer.

Build a complete, production-ready Minecraft plugin named "Slayers" for Minecraft 1.21.11.

The plugin must be lightweight, highly customizable, persistent, and designed primarily as a Slayer progression + PlaceholderAPI framework.

Do not turn this into a boss-management plugin.

---

  1. Target Environment

Target:

  • Minecraft: 1.21.11
  • Java: 21+
  • Server software: Paper-compatible servers, including Leaf/Paper forks
  • Build system: Gradle or Maven
  • Plugin language: Java
  • Plugin name: "Slayers"
  • Main command: "/slayers"

The finished project must compile successfully and produce a working:

Slayers.jar

Do not provide pseudocode.

Implement the actual Java classes, configuration files, plugin metadata, commands, GUI, storage, PlaceholderAPI expansion, events, and API.

---

  1. Core Philosophy

"Slayers" is NOT a boss plugin.

It is a lightweight progression framework.

The plugin's job is essentially:

Slayer ↓ Player XP ↓ Level calculation ↓ Progression ↓ Placeholders ↓ GUI

External plugins decide when XP should be awarded.

For example:

External Plugin ↓ /slayers addxp spider Player 50 ↓ Slayers ↓ Spider XP +50 ↓ Recalculate Level ↓ Update progression ↓ PlaceholderAPI / GUI

The Slayers plugin must not care where the XP came from.

---

  1. Absolutely Do NOT Implement

Do NOT add unnecessary systems.

The plugin must NOT contain:

  • Boss spawning
  • Boss AI
  • Boss health
  • Boss damage
  • Boss skills
  • Boss mechanics
  • Boss drops
  • Mob configuration
  • Mob scanning
  • Entity scanning
  • Combat tracking
  • Damage tracking
  • Kill detection
  • Drop handling
  • Custom mob systems
  • Quest-start systems
  • Quest completion systems
  • Boss ownership
  • Active boss tracking
  • Boss timers
  • Boss entities
  • MythicMobs configuration
  • MythicMobs mob management
  • Custom boss mechanics
  • Per-tick entity processing

Do not create a "MythicMobs integration system" unless it is strictly necessary for basic compatibility.

The plugin should simply expose an API and commands that other plugins can use to award XP.

---

  1. Dynamic Slayer System

Slayers must NOT be hardcoded.

The administrator should be able to create custom Slayers.

Example:

/slayers addslayer Spider /slayers addslayer Zombie /slayers addslayer Enderman /slayers addslayer Blaze

Creating:

/slayers addslayer Spider

should create a Slayer with an ID such as:

spider

and display name:

Spider Slayer

The new Slayer should become available immediately without requiring a server restart.

Do not create separate Java classes for individual Slayers.

One generic Slayer implementation must handle every Slayer.

---

  1. Slayer Configuration

Each Slayer should have its own YAML configuration.

Example:

id: spider

display-name: "&aSpider Slayer"

prefix: "&8[&aSpider Slayer&8] &r"

enabled: true

description: - "&7Progress through the Spider Slayer." - "&7Gain XP and level up."

icon: material: SPIDER_EYE display-name: "&aSpider Slayer"

The configuration should be customizable without modifying Java code.

---

  1. XP System

XP is one of the most important features.

Each Slayer has completely independent XP.

Example:

Spider Slayer:

XP: 7,500 Level: 5

Zombie Slayer:

XP: 2,100 Level: 4

Changing Spider XP must never affect Zombie XP.

---

  1. XP Commands

Implement:

/slayers addxp <slayer> <player> <amount>

Example:

/slayers addxp spider RealPr 50

This adds 50 Spider Slayer XP.

Also implement:

/slayers removexp <slayer> <player> <amount> /slayers setxp <slayer> <player> <amount> /slayers setlevel <slayer> <player> <level> /slayers reset <slayer> <player>

Add proper argument validation and helpful error messages.

Amounts must not allow invalid values such as negative XP where inappropriate, NaN, infinity, etc.

---

  1. XP Progression Modes

Support multiple progression modes.

At minimum:

STATIC PERCENTAGE MULTIPLIER

STATIC

xp: max-level: 7

progression: type: STATIC

levels: 1: required-xp: 0 2: required-xp: 5 3: required-xp: 15 4: required-xp: 200 5: required-xp: 1000 6: required-xp: 5000 7: required-xp: 20000

PERCENTAGE

xp: max-level: 50

progression: type: PERCENTAGE starting-xp: 100 increase-percent: 25.0

MULTIPLIER

xp: max-level: 50

progression: type: MULTIPLIER starting-xp: 100 multiplier: 1.25

---

  1. Custom XP Overrides

Automatic progression must support manual overrides.

Example:

xp: max-level: 50

progression: type: PERCENTAGE starting-xp: 100 increase-percent: 25.0

overrides: 10: 5000 20: 25000 30: 100000 40: 500000 50: 2500000

This allows normal automatic progression while giving the administrator complete control over specific levels.

---

  1. XP Storage

Use cumulative XP by default.

Example:

Level 1 = 0 XP Level 2 = 100 XP Level 3 = 250 XP Level 4 = 500 XP

A player with 400 XP is Level 3.

Their stored XP remains:

400

Do not reset XP when a player levels up.

The plugin should support configurable rounding for generated XP requirements.

---

  1. Level Calculation

The level must always be derived from the player's current XP and the configured requirements.

Example:

0 XP → Level 1 100 XP → Level 2 250 XP → Level 3 500 XP → Level 4

If a player receives enough XP to pass multiple levels at once, correctly detect every crossed level.

Example:

Level 2 +10,000 XP ↓ Level 7

Fire the appropriate level-up events for the levels crossed.

Do not require a repeating task for level calculation.

---

  1. Level-Up Events

Create a proper Bukkit/Paper event API.

At minimum:

SlayerXPChangeEvent SlayerLevelUpEvent

The level-up event should contain:

  • Player
  • Slayer
  • Previous level
  • New level
  • Current XP

The XP event should contain:

  • Player
  • Slayer
  • Previous XP
  • New XP
  • XP difference

Events should allow cancellation where appropriate.

---

  1. PlaceholderAPI Support

PlaceholderAPI support is a major requirement.

Create one dynamic PlaceholderAPI expansion.

Do NOT create a separate expansion for every Slayer.

Use:

%slayer_<id>_<property>%

Examples:

%slayer_spider_name% %slayer_spider_prefix%

%slayer_spider_level% %slayer_spider_max_level%

%slayer_spider_xp% %slayer_spider_xp_required% %slayer_spider_xp_to_next%

%slayer_spider_progress% %slayer_spider_progress_percent% %slayer_spider_progress_bar%

%slayer_spider_next_level% %slayer_spider_is_max_level%

The expansion must dynamically resolve any currently registered Slayer.

If a Slayer does not exist, return a safe fallback rather than throwing errors.

---

  1. Progress Bar

Support configurable progress bars.

Example:

progress-bar: length: 20

completed: "&a■" remaining: "&7■"

prefix: "&8[" suffix: "&8]"

Example output:

&8[&a■■■■■■■■■■■■■&7■■■■■■■&8]

Expose it through:

%slayer_spider_progress_bar%

---

  1. GUI

Create a built-in GUI.

Command:

/slayers

or:

/slayers menu

opens the main Slayer menu.

The GUI must automatically display all currently registered/created Slayers.

Example:

┌─────────────────────────────────────┐ │ SLAYERS │ │ │ │ Spider Zombie │ │ │ │ Enderman Blaze │ │ │ └─────────────────────────────────────┘

The GUI should not require manually adding an item every time a new Slayer is created.

---

  1. Slayer GUI Items

Each Slayer should display information about the player's progression.

Example:

&aSpider Slayer

&7Level: &f5 &7XP: &f7,500 &7Progress: &a75%

&8[&a■■■■■■■■■■■■■■■&7□□□□□&8]

&eClick to view!

Use PlaceholderAPI-style internal values or equivalent dynamic data.

---

  1. Slayer Detail GUI

Clicking a Slayer should open a detailed progression GUI.

It should display:

Slayer Name Current Level Maximum Level Current XP Required XP XP Remaining Progress Percentage Progress Bar Next Level

Example:

SPIDER SLAYER

Level: 5 / 7

XP: 7,500 / 10,000

[■■■■■■■■■■■■■■■□□□□□]

75%

2,500 XP to Level 6

---

  1. GUI Configuration

Make the GUI customizable.

Example:

gui: title: "&8Slayers" size: 54

filler: enabled: true material: GRAY_STAINED_GLASS_PANE name: " "

slayer-item: material: "%slayer_icon%" display-name: "%slayer_name%"

lore: - "" - "&7Level: &f%slayer_level%" - "&7XP: &f%slayer_xp%" - "" - "%slayer_progress_bar%" - "" - "&eClick to view!"

The exact implementation may use internal placeholder replacement rather than PlaceholderAPI itself.

---

  1. GUI Navigation

Implement:

  • Main Slayer menu
  • Individual Slayer progression menu
  • Back button
  • Close button
  • Configurable item slots
  • Configurable menu size
  • Configurable titles

Avoid unnecessary GUI complexity.

---

  1. Slayer Ordering

Allow administrators to control the order in which Slayers appear.

Example:

gui: order: - zombie - spider - enderman - blaze

If no order is configured, use creation/configuration order.

---

  1. Level-Up Notifications

Support configurable level-up notifications.

Example:

level-up: enabled: true

message: enabled: true lines: - "" - "&a&lLEVEL UP!" - "&7Your %slayer_name% is now Level &f%slayer_level%&7!" - ""

title: enabled: true title: "&a&lLEVEL UP!" subtitle: "&7Level %slayer_level%"

sound: enabled: true sound: ENTITY_PLAYER_LEVELUP volume: 1.0 pitch: 1.0

All of this should be optional.

---

  1. Storage

Implement persistent storage.

The default should be lightweight.

SQLite is recommended as the default storage system.

Optionally support MySQL/MariaDB for larger servers.

Player data should contain at minimum:

UUID Slayer ID XP Level

Do not perform a database query every time a placeholder is requested.

Use an in-memory cache for online players and asynchronously save data.

Never perform blocking database operations on the Minecraft main thread.

---

  1. Performance

Performance is extremely important.

The plugin should use an event-driven architecture.

There must be:

  • No entity scanning
  • No mob scanning
  • No combat scanning
  • No per-tick player scanning
  • No per-tick XP calculations
  • No constant database polling
  • No unnecessary scheduled tasks

XP processing only happens when:

addXP() removeXP() setXP() setLevel()

or an equivalent operation is called.

Placeholder requests should be extremely cheap.

---

  1. API

Expose a clean API for other plugins.

Provide methods similar to:

Slayer getSlayer(String id);

double getXP(UUID player, String slayerId);

int getLevel(UUID player, String slayerId);

void addXP(UUID player, String slayerId, double amount);

void removeXP(UUID player, String slayerId, double amount);

void setXP(UUID player, String slayerId, double amount);

void setLevel(UUID player, String slayerId, int level);

double getRequiredXP(String slayerId, int level);

double getXPToNextLevel(UUID player, String slayerId);

double getProgress(UUID player, String slayerId);

The API must not require other plugins to depend on internal implementation classes.

---

  1. Commands

Implement:

/slayers /slayers menu /slayers list /slayers info <slayer>

/slayers addslayer <name> /slayers removeslayer <name> /slayers reload

/slayers addxp <slayer> <player> <amount> /slayers removexp <slayer> <player> <amount> /slayers setxp <slayer> <player> <amount>

/slayers setlevel <slayer> <player> <level> /slayers reset <slayer> <player>

/slayers debug <slayer>

Add tab completion for all applicable arguments.

Use Brigadier/Paper command APIs where appropriate for Minecraft 1.21.11.

---

  1. Permissions

At minimum:

slayers.use slayers.admin slayers.create slayers.delete slayers.reload slayers.xp slayers.setlevel slayers.reset

Normal players should only need:

slayers.use

to open the GUI.

---

  1. Configuration Reloading

Implement:

/slayers reload

The reload should safely reload:

  • Slayer configurations
  • GUI configuration
  • Messages
  • Progression settings

Do not blindly reload the entire plugin or recreate database connections unnecessarily.

If a configuration is invalid, log a clear error identifying the file and setting.

---

  1. Error Handling

The plugin must fail gracefully.

Examples:

If an administrator runs:

/slayers addxp fake Player 50

return:

Unknown Slayer: fake

If the player does not exist:

Player not found.

If XP is invalid:

XP amount must be a valid positive number.

Do not throw uncaught exceptions into console for normal user mistakes.

---

  1. Data Safety

Do not lose player progression during:

  • Server restart
  • Plugin reload
  • Player disconnect
  • Configuration reload

Save cached player data asynchronously.

Flush important pending data during plugin shutdown.

Use safe database operations and transactions where appropriate.

---

  1. Project Structure

Use a clean professional architecture.

For example:

src/main/java/ └── <package>/ └── slayers/ ├── SlayersPlugin.java │ ├── command/ │ ├── SlayersCommand.java │ └── SlayerTabCompleter.java │ ├── slayer/ │ ├── Slayer.java │ ├── SlayerManager.java │ ├── SlayerProgression.java │ └── ProgressionType.java │ ├── player/ │ ├── PlayerSlayerData.java │ └── PlayerDataManager.java │ ├── gui/ │ ├── SlayerMenu.java │ └── SlayerProgressMenu.java │ ├── placeholder/ │ └── SlayerPlaceholderExpansion.java │ ├── event/ │ ├── SlayerXPChangeEvent.java │ └── SlayerLevelUpEvent.java │ ├── storage/ │ ├── StorageProvider.java │ ├── SQLiteStorage.java │ └── MySQLStorage.java │ ├── api/ │ └── SlayerAPI.java │ └── util/

Do not blindly copy this structure if a better architecture is appropriate, but maintain clear separation of responsibilities.

---

  1. Plugin Dependencies

PlaceholderAPI should be an optional dependency.

If PlaceholderAPI is installed:

PlaceholderAPI support = enabled

If it is not installed:

Slayers still works normally.

Do not make PlaceholderAPI mandatory for the core progression system.

---

  1. plugin.yml

Create a proper plugin descriptor for Minecraft 1.21.11.

Include:

  • Plugin name
  • Version
  • Main class
  • API version appropriate for 1.21.11
  • Commands
  • Permissions
  • PlaceholderAPI soft-dependency

Use correct Bukkit/Paper plugin metadata.

---

  1. Default Configuration

Include a complete default configuration that demonstrates:

  • Creating a Slayer
  • Static progression
  • Percentage progression
  • Progress bar
  • GUI
  • Messages
  • Level-up notifications
  • Storage
  • Command messages

The default installation should work immediately.

---

  1. Important Design Rule

Do not overengineer this plugin.

The following principle should guide the entire implementation:

«Slayers stores progression. Other plugins decide when progression changes.»

If another plugin wants to give XP:

Slayers API

or:

/slayers addxp

is all it needs.

Slayers should never need to understand the source of the XP.

---

  1. Final Deliverable

Provide a complete, compilable project.

The final project must include:

Source code Build configuration plugin.yml / Paper metadata Default configurations Database/storage implementation Commands Tab completion GUI PlaceholderAPI expansion Events Public API Permissions README

The plugin must compile successfully for Minecraft 1.21.11 and produce:

Slayers.jar

Before considering the implementation complete, test the following:

  1. Create a Slayer.
  2. Restart the server.
  3. Confirm the Slayer remains.
  4. Join a player.
  5. Add XP.
  6. Confirm XP persists.
  7. Confirm level calculation works.
  8. Test a level-up.
  9. Test multiple level-ups from one XP addition.
  10. Test PlaceholderAPI placeholders.
  11. Open "/slayers".
  12. Open an individual Slayer.
  13. Confirm GUI values update after XP changes.
  14. Test removing XP.
  15. Test setting XP.
  16. Test setting a level.
  17. Test resetting progression.
  18. Test "/slayers reload".
  19. Test invalid commands.
  20. Confirm there are no unnecessary repeating tasks or entity scans.

Do not stop at a conceptual design.

Actually implement the complete plugin.

Kodari AI
KodariOct 2 at 8:21 pm 2
SlayersProgression
A lightweight Minecraft plugin framework for managing player slayer progression. Features dynamic slayer creation, independent XP tracking per slayer, multiple progression modes (STATIC, PERCENTAGE, MULTIPLIER), level-up events, PlaceholderAPI expansion, configurable GUI menus, SQLite/MySQL storage, and a clean API for external plugins. Designed as a progression framework where external plugins control when XP is awarded.
  1. Create the Gradle project, plugin metadata, defaults, and sample Slayer configuration.

  2. Implement generic Slayer progression, async SQLite-backed player data, events, and public API.

  3. Add commands/tab completion, configurable menus, PlaceholderAPI expansion, and level-up notifications.

Created the Slayers Gradle project. It includes configurable Slayer YAMLs and progression modes, asynchronous SQLite storage, XP and level-up events, a public API, commands and tab completion, configurable menus, optional PlaceholderAPI support, and default Spider and Zombie examples.

Run gradle build to generate build/libs/Slayers.jar. I did not run a Gradle build or server smoke tests in this environment.

realprinario-ctrl

Make sure it comes with NO defaults.

Add:

  • Placeholders

Placeholders for each, basicly each placeholder should look like this: %(Slayer_name)slayer_(placeholder)% So ex: If the slayer is spider: %spiderslayer_xp% Add a cmd that lists all placeholders.

Kodari AI
KodariOct 3 at 1:28 am 1
  1. Remove any built-in/default slayers or placeholder defaults.

  2. Add per-slayer PlaceholderAPI expansions for slayer data.

  3. Add a command that lists the available placeholders.

  1. Fresh installs no longer receive default Spider or Zombie Slayers; existing user-created Slayer configs are preserved.

  2. Registered per-Slayer placeholders such as %spiderslayer_xp%, covering the existing Slayer properties.

  3. Added /slayers placeholders to list placeholders for each configured Slayer. The list updates when Slayers are created, removed, or reloaded.

realprinario-ctrl

%slayers_count% %slayers_enabled_count% %slayers_total_xp% %slayers_total_levels%

%slayer_<id>_name% %slayer_<id>_id% %slayer_<id>_prefix% %slayer_<id>_description% %slayer_<id>_icon%

%slayer_<id>_xp% %slayer_<id>_xp_formatted% %slayer_<id>_xp_required% %slayer_<id>_xp_to_next% %slayer_<id>_xp_remaining%

%slayer_<id>_level% %slayer_<id>_max_level% %slayer_<id>_next_level%

%slayer_<id>_progress% %slayer_<id>_progress_percent% %slayer_<id>_progress_bar%

%slayer_<id>_is_max_level% %slayer_<id>_is_unlocked%

Example — Spider Slayer:

%slayer_spider_name% %slayer_spider_id% %slayer_spider_prefix% %slayer_spider_description% %slayer_spider_icon%

%slayer_spider_xp% %slayer_spider_xp_formatted% %slayer_spider_xp_required% %slayer_spider_xp_to_next% %slayer_spider_xp_remaining%

%slayer_spider_level% %slayer_spider_max_level% %slayer_spider_next_level%

%slayer_spider_progress% %slayer_spider_progress_percent% %slayer_spider_progress_bar%

%slayer_spider_is_max_level% %slayer_spider_is_unlocked% add these placeholders

Kodari AI
KodariOct 3 at 4:05 pm 1
  1. Add the shared %slayers_*% and %slayer_<id>_*% expansion while keeping existing Slayer placeholders.

  2. Update /slayers placeholders to list the new placeholders, global placeholders, and existing aliases.

  3. Include disabled state in is_unlocked and sum player XP/levels across configured Slayers.

Added all requested %slayers_*% and %slayer_<id>_*% placeholders, including XP/progression, metadata, progress, and status values. /slayers placeholders now lists them alongside the existing per-Slayer aliases. is_unlocked reflects whether that Slayer is enabled in its config.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
22 1,641
src/main/java/com/kodari/slayers/SlayersPlugin.java
package com.kodari.slayers;

import com.kodari.slayers.api.SlayerAPI;
import com.kodari.slayers.command.SlayersCommand;
import com.kodari.slayers.gui.SlayerGUI;
import com.kodari.slayers.listener.LevelUpListener;
import com.kodari.slayers.placeholder.SlayerPlaceholderExpansion;
import com.kodari.slayers.placeholder.SlayersPlaceholderExpansion;
import com.kodari.slayers.player.PlayerDataManager;
import com.kodari.slayers.slayer.Slayer;
import com.kodari.slayers.slayer.SlayerManager;
import com.kodari.slayers.storage.SQLiteStorage;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;

public final class SlayersPlugin extends JavaPlugin {
    private SQLiteStorage storage;
    private SlayerManager slayerManager;
    private PlayerDataManager playerDataManager;
    private SlayerAPI api;
    private final Map<String, SlayerPlaceholderExpansion> placeholderExpansions = new HashMap<>();
    private SlayersPlaceholderExpansion slayersPlaceholderExpansion;

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

        storage = new SQLiteStorage(this, new File(getDataFolder(), getConfig().getString("storage.file", "players.db")));
        slayerManager = new SlayerManager(this);
        slayerManager.reload();
        playerDataManager = new PlayerDataManager(this, storage, slayerManager);
        refreshPlaceholderExpansions();
        api = new SlayerAPI(slayerManager, playerDataManager);

        SlayerGUI gui = new SlayerGUI(this, slayerManager, playerDataManager);
        Bukkit.getPluginManager().registerEvents(gui, this);
        Bukkit.getPluginManager().registerEvents(new LevelUpListener(this, slayerManager), this);
        Bukkit.getPluginManager().registerEvents(playerDataManager, this);

        SlayersCommand command = new SlayersCommand(this, slayerManager, playerDataManager, gui);
        Objects.requireNonNull(getCommand("slayers")).setExecutor(command);
        Objects.requireNonNull(getCommand("slayers")).setTabCompleter(command);

    }

    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
        if (storage != null) {
            try {
                storage.closeAsync().get(10, TimeUnit.SECONDS);
            } catch (Exception exception) {
                getLogger().severe("Could not finish saving Slayer data: " + exception.getMessage());
            }
        }
    }

    public void reloadSlayers() {
        reloadConfig();
        slayerManager.reload();
    }

    public void refreshPlaceholderExpansions() {
        if (playerDataManager == null) return;
        for (SlayerPlaceholderExpansion expansion : placeholderExpansions.values()) {
            expansion.unregister();
        }
        placeholderExpansions.clear();
        if (slayersPlaceholderExpansion != null) {
            slayersPlaceholderExpansion.unregister();
            slayersPlaceholderExpansion = null;
        }
        if (!Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) return;

        slayersPlaceholderExpansion = new SlayersPlaceholderExpansion(this, slayerManager, playerDataManager);
        slayersPlaceholderExpansion.register();
        for (Slayer slayer : slayerManager.getSlayers()) {
            SlayerPlaceholderExpansion expansion = new SlayerPlaceholderExpansion(this, slayerManager, playerDataManager, slayer.getId());
            if (expansion.register()) placeholderExpansions.put(slayer.getId(), expansion);
        }
        getLogger().info("Registered " + placeholderExpansions.size() + " Slayer PlaceholderAPI expansion(s).");
    }

    public SlayerManager getSlayerManager() {
        return slayerManager;
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public SlayerAPI getAPI() {
        return api;
    }
}