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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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%
---
- 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.
---
- 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.
---
- 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
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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.
---
- 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:
- Create a Slayer.
- Restart the server.
- Confirm the Slayer remains.
- Join a player.
- Add XP.
- Confirm XP persists.
- Confirm level calculation works.
- Test a level-up.
- Test multiple level-ups from one XP addition.
- Test PlaceholderAPI placeholders.
- Open "/slayers".
- Open an individual Slayer.
- Confirm GUI values update after XP changes.
- Test removing XP.
- Test setting XP.
- Test setting a level.
- Test resetting progression.
- Test "/slayers reload".
- Test invalid commands.
- Confirm there are no unnecessary repeating tasks or entity scans.
Do not stop at a conceptual design.
Actually implement the complete plugin.