Manirul Islam

XP SMP — Premium Minecraft Paper Plugin Development Prompt

Create a premium, high-quality, production-ready Minecraft plugin for an SMP server called XP SMP.

The plugin must be designed as a complete, integrated progression system where all features work together seamlessly.

---

Technical Requirements

  • Minecraft Version: 1.21.8
  • Server Software: Paper (Spigot-compatible where possible)
  • Java Version: Java 21
  • Build System: Maven
  • Code Quality: Clean, optimized, modular, and maintainable
  • Compilation: The project must compile successfully without errors
  • Architecture: Well-structured packages with a clear separation of responsibilities
  • Configuration: Every major feature must be configurable
  • Documentation: Important classes and complex logic should be properly commented
  • Performance: The plugin must be optimized for multiplayer SMP servers

Generate the complete project, including:

  • "pom.xml"
  • "plugin.yml"
  • "config.yml"
  • "messages.yml"
  • Complete Java source code
  • Default configuration files
  • Permission nodes
  • Command definitions
  • Tab completion where appropriate

Do not generate empty placeholder classes or incomplete implementations.

---

  1. XP Skills System

Create a complete skills system with the following default skills:

  • Mining
  • Farming
  • Combat
  • Fishing
  • Exploring

Requirements

  • Separate XP and levels for each skill
  • Configurable XP requirements per level
  • Configurable maximum levels
  • Configurable level rewards and bonuses
  • Support for future skill expansion
  • Beautiful and interactive GUI for viewing player skills
  • Display current level, XP progress, bonuses, and skill information
  • Persistent player skill data

---

  1. XP Bank

Create an XP banking system where players can safely store XP.

Features

  • Deposit XP into the bank
  • Withdraw XP from the bank
  • Configurable bank limits
  • XP stored in the bank should not be lost when the player dies
  • Optional GUI for managing banked XP
  • Proper validation for all transactions
  • Protection against duplication and transaction exploits

---

  1. XP Shop

Create a fully configurable XP Shop where players can spend XP.

Shop Categories

  • Items
  • Crate Keys
  • Cosmetics
  • Special Rewards

Requirements

  • Fully configurable shop GUI
  • Configurable item prices
  • Configurable categories and inventory layouts
  • Purchase confirmation where appropriate
  • Support for permissions and other requirements
  • Clear messages for successful and failed purchases
  • Safe transaction handling to prevent XP or item duplication

---

  1. XP Crates

Create an XP Crate system.

Features

  • Players can open crates using XP
  • Configurable XP opening cost
  • Random rewards with configurable chances
  • Support for items, commands, permissions, and special rewards
  • Beautiful crate-opening GUI or animation where practical
  • Configurable crate rewards and probabilities
  • Protection against reward duplication and exploit issues

---

  1. XP Boss Events

Create an automatic XP Boss Event system.

Requirements

  • Boss automatically spawns every configurable number of hours
  • Broadcast messages before spawning
  • Configurable spawn locations
  • Configurable boss type
  • Configurable health, equipment, abilities, and attributes
  • XP rewards for defeating the boss
  • Rare loot rewards with configurable chances
  • Optional contribution and damage tracking
  • Fair reward distribution based on configurable rules
  • Configurable event messages

---

  1. XP Quests

Create a quest system with:

  • Daily Quests
  • Weekly Quests

Example Quest Objectives

  • Mine blocks
  • Kill mobs
  • Catch fish
  • Travel distances
  • Harvest crops

Requirements

  • Automatic daily and weekly resets
  • Configurable quests and objectives
  • Configurable rewards
  • Quest progress tracking
  • Beautiful Quest GUI
  • Persistent progress after server restarts
  • Safe reset and reward handling

---

  1. XP Leaderboard

Create an XP Leaderboard system.

Features

  • Rank players based on total XP
  • Configurable leaderboard size
  • Support for GUI leaderboard
  • Optional hologram support through external integrations where available
  • Efficient database queries
  • Caching to minimize performance impact
  • Accurate and persistent ranking data

---

  1. Custom XP Swords System

Create a premium Custom XP Swords System with unique swords, progression, tiers, abilities, upgrades, and special effects.

Sword Tiers

The system must support the following default rarity tiers:

  • Common
  • Rare
  • Epic
  • Legendary
  • Mythic

All tiers must be fully configurable, including:

  • Names
  • Colors
  • Requirements
  • Statistics
  • Abilities
  • Upgrade paths

Unlocking and Crafting

Players should be able to obtain Custom XP Swords through configurable methods, including:

  • Unlocking swords using XP
  • Crafting swords using configurable recipes
  • Purchasing swords from the XP Shop
  • Receiving swords as crate rewards
  • Receiving swords as quest rewards
  • Administrator commands

Each sword should support configurable requirements such as:

  • Required XP
  • Required player level
  • Required skill level
  • Required permissions
  • Required materials or items

Custom Sword Abilities

Each Custom XP Sword can have one or more unique configurable abilities.

Example abilities may include:

  • Extra damage
  • Life steal
  • Lightning strikes
  • Fire effects
  • Freeze or slow effects
  • Area damage
  • Temporary speed or strength boosts
  • XP bonus on kills
  • Custom passive abilities
  • Special right-click abilities

Ability Requirements

  • Abilities must be configurable per sword
  • Ability damage, duration, range, and effects must be configurable
  • Support both active and passive abilities
  • Support configurable cooldowns
  • Prevent ability abuse or spam
  • Display cooldown information to players
  • Ensure abilities are optimized and do not cause server lag

Sword Upgrade System

Create a beautiful and interactive GUI where players can:

  • View all available XP Swords
  • Check sword statistics
  • View rarity and tier
  • View abilities and cooldowns
  • Unlock new swords
  • Upgrade existing swords
  • View upgrade requirements and costs

Upgrades should be configurable and may require:

  • XP
  • Materials
  • Special items
  • Skill levels
  • Other configurable requirements

The GUI should provide clear feedback when an upgrade succeeds or fails.

Visual and Sound Effects

All visual effects must be configurable, including:

  • Particle effects
  • Sounds
  • Ability activation effects
  • Upgrade effects
  • Unlock effects
  • Kill effects

Server administrators must be able to enable, disable, or customize these effects through configuration files.

Item Identification and Security

Custom XP Swords must be securely identified using persistent item data rather than relying only on display names or lore.

Security Requirements

  • Use Paper's "PersistentDataContainer" API for secure sword identification
  • Store sword ID, tier, and relevant metadata safely
  • Validate items before allowing upgrades or ability activation
  • Prevent forged or renamed items from being treated as valid XP Swords
  • Protect against common item duplication exploits
  • Validate transactions before removing XP or materials
  • Ensure failed operations do not accidentally consume player resources
  • Avoid unsafe inventory manipulation
  • Handle server restarts and player disconnects safely

All sword definitions, abilities, tiers, costs, recipes, cooldowns, particle effects, and sounds must be configurable through the plugin configuration files.

---

Commands and Permissions

Every command must have appropriate permission nodes and proper permission checks.

Player Commands

  • "/xp"
  • "/xp skills"
  • "/xp bank"
  • "/xp shop"
  • "/xp crates"
  • "/xp quests"
  • "/xp leaderboard"
  • "/xp swords"
  • "/xp swords gui"
  • "/xp swords upgrade"
  • "/xp swords unlock"

Administrator Commands

  • "/xp reload"
  • "/xp swords give <player> <sword>"
  • "/xp swords remove <player>"
  • "/xp swords reset <player>"
  • "/xp swords admin"

Example Permissions

Player Permissions

  • "xp.use"
  • "xp.skills"
  • "xp.bank"
  • "xp.shop"
  • "xp.crates"
  • "xp.quests"
  • "xp.leaderboard"
  • "xp.swords"
  • "xp.swords.upgrade"
  • "xp.swords.unlock"

Administrator Permissions

  • "xp.admin"
  • "xp.reload"
  • "xp.swords.admin"
  • "xp.swords.give"
  • "xp.swords.remove"
  • "xp.swords.reset"

Command Requirements

  • Proper permission checks
  • Permission-based GUI access
  • Tab completion support
  • Clear error and usage messages
  • Player-only commands must handle console execution safely
  • Administrator commands must validate all arguments

---

Global Integrations

PlaceholderAPI Support

Add optional PlaceholderAPI support for placeholders related to the entire XP SMP system.

Examples may include:

  • Player total XP
  • Skill levels
  • Individual skill XP
  • Bank XP
  • Quest progress
  • Equipped sword name
  • Equipped sword tier
  • Sword level
  • Ability cooldown status

The plugin must work normally even when PlaceholderAPI is not installed.

Vault Support

Add optional Vault support where relevant.

The plugin must safely handle Vault being unavailable and should never fail to start because an optional integration is missing.

---

Database Support

Support both:

  • SQLite (default option)
  • MySQL

Requirements

  • Database settings configurable in "config.yml"
  • Proper connection management
  • Efficient queries
  • Prepared statements
  • Safe database initialization
  • Automatic table creation
  • Async database operations where appropriate to avoid blocking the main server thread
  • Proper cleanup of database resources during plugin shutdown
  • Reliable handling of database errors

---

Performance and Reliability

The plugin should be optimized for multiplayer SMP servers.

Requirements

  • Automatic data saving
  • Configurable autosave interval
  • Safe data saving on plugin shutdown
  • Avoid unnecessary synchronous database operations
  • Use caching where beneficial
  • Prevent memory leaks
  • Handle configuration reloads safely
  • Provide a "/xp reload" command to reload configurations
  • Ensure data integrity
  • Protect against common XP and item duplication exploits
  • Avoid blocking the main server thread during expensive operations

---

Configuration Requirements

All major systems must be configurable through configuration files.

Use:

  • "config.yml" for general plugin settings
  • "messages.yml" for all player-facing messages

Configuration should allow administrators to customize major features without modifying the source code.

Messages should support:

  • Configurable prefixes
  • Color formatting
  • Clear success and error messages
  • Configurable text for major events

---

Final Deliverable

Generate the complete Maven project structure and all source files required to compile and run the plugin.

The final project must:

  1. Compile successfully with Maven and Java 21.
  2. Target Minecraft Paper 1.21.8.
  3. Include all required dependencies.
  4. Include a valid "plugin.yml".
  5. Include complete implementations rather than empty placeholder classes.
  6. Include comments explaining important functionality.
  7. Be clean, modular, optimized, and maintainable.
  8. Ensure all eight major XP systems work together as one integrated plugin.
  9. Include commands, permissions, integrations, database support, performance safeguards, and configuration files.
  10. Be suitable as a strong, production-ready foundation for a real SMP server.

Do not omit any required files or features. If a feature requires an optional dependency, implement it safely so the plugin continues to work normally when that dependency is not installed.

Kodari AI
KodariAug 27 at 2:32 pm 3
XpSmpCore
A comprehensive Minecraft SMP progression plugin integrating eight major systems: skills with separate XP and levels, an XP bank for safe storage, a configurable XP shop, XP crates with random rewards, automatic boss events, daily and weekly quests, an XP leaderboard, and custom XP swords with tiers and abilities. Features persistent data storage via SQLite or MySQL, PlaceholderAPI and Vault integrations, secure item identification using PersistentDataContainer, and a modular architecture with GUI-based interfaces for all systems. Includes configurable permissions, messages, and effects, optimized for multiplayer performance with caching and async database operations.
  1. Core project and configuration

  2. Persistent data, XP/skills/bank services, and database support

  3. Shop, crates, quests, boss events, swords, GUI, commands, and integrations

Created the complete XP SMP Maven plugin project with:

  • Paper 1.21.8 / Java 21 Maven setup

  • SQLite and MySQL persistence

  • XP skills and leveling

  • XP bank with limits

  • Configurable XP shop

  • XP crates with weighted rewards

  • Automated boss events

  • Daily and weekly quests

  • XP leaderboard

  • Secure PersistentDataContainer-based XP swords

  • Sword abilities, upgrades, unlocking, and admin commands

  • Inventory GUIs

  • Permissions and tab completion

  • Configurable messages and settings

  • Optional PlaceholderAPI integration

  • Autosaving and shutdown persistence

  • plugin.yml, config.yml, messages.yml, and complete Java source structure

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
25 1,230
src/main/java/com/xpsmp/XpSmpPlugin.java
package com.xpsmp;

import com.xpsmp.command.XpCommand;
import com.xpsmp.data.DatabaseManager;
import com.xpsmp.data.PlayerDataManager;
import com.xpsmp.gui.GuiService;
import com.xpsmp.listener.XpListener;
import com.xpsmp.service.BankService;
import com.xpsmp.service.BossService;
import com.xpsmp.service.CrateService;
import com.xpsmp.service.LeaderboardService;
import com.xpsmp.service.QuestService;
import com.xpsmp.service.ShopService;
import com.xpsmp.service.SkillService;
import com.xpsmp.service.SwordService;
import com.xpsmp.util.MessageManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class XpSmpPlugin extends JavaPlugin {
    private MessageManager messages;
    private DatabaseManager database;
    private PlayerDataManager data;
    private SkillService skills;
    private BankService bank;
    private ShopService shop;
    private CrateService crates;
    private QuestService quests;
    private SwordService swords;
    private LeaderboardService leaderboard;
    private BossService boss;
    private GuiService gui;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        messages = new MessageManager(this);
        database = new DatabaseManager(this);
        database.initialize();
        data = new PlayerDataManager(this, database);
        skills = new SkillService(this); bank = new BankService(this); shop = new ShopService(this); crates = new CrateService(this); quests = new QuestService(this); swords = new SwordService(this); leaderboard = new LeaderboardService(this); boss = new BossService(this); gui = new GuiService(this);
        getServer().getPluginManager().registerEvents(new XpListener(this), this);
        XpCommand command = new XpCommand(this); getCommand("xp").setExecutor(command); getCommand("xp").setTabCompleter(command);
        long autosave = Math.max(20, getConfig().getLong("database.autosave-seconds", 60) * 20);
        Bukkit.getScheduler().runTaskTimerAsynchronously(this, data::saveAll, autosave, autosave);
        boss.schedule();
        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) new com.xpsmp.integration.XpPlaceholders(this).register();
    }

    @Override public void onDisable() { if (data != null) data.saveAll(); }
    public void reloadPlugin() { reloadConfig(); messages.reload(); swords.reload(); }
    public MessageManager messages() { return messages; }
    public PlayerDataManager data() { return data; }
    public SkillService skills() { return skills; }
    public BankService bank() { return bank; }
    public ShopService shop() { return shop; }
    public CrateService crates() { return crates; }
    public QuestService quests() { return quests; }
    public SwordService swords() { return swords; }
    public LeaderboardService leaderboard() { return leaderboard; }
    public BossService boss() { return boss; }
    public GuiService gui() { return gui; }
}