A

EpicKits - Advanced Persistent Minecraft Kits Plugin

Create a complete, professional, production-ready Minecraft Paper/Spigot plugin called EpicKits for Minecraft 1.21+.

The plugin must be written using modern Java practices, optimized for large SMP networks, beginner-friendly for server owners, and completely free from console spam, deprecated APIs, memory leaks, duplication exploits, and cooldown reset issues.

---

CORE PURPOSE

EpicKits is an advanced INVENTORY INVENTORY GUI-based kit system.

Admins create kits directly from in-game items.

The plugin must save and restore items EXACTLY as they exist.

The following must be fully preserved:

  • Shulker Boxes (including all contents)
  • Custom Names
  • Lore
  • Enchantments
  • Item Flags
  • Potion Data
  • Attributes
  • Custom Model Data
  • Persistent Data Container
  • NBT Data
  • Written Books
  • Fireworks
  • Maps
  • Player Heads
  • Banner Patterns
  • Armor Trims
  • Any Paper-supported ItemMeta

When a player claims a kit, the item must be restored exactly as it was saved.

---

COMMANDS

Open Kits INVENTORY GUI

/kits

Opens the main kits inventory INVENTORY GUI.

Permission: epickits.use

---

Create Kit

/epickits create <slot|auto>

Examples:

/epickits create Starter 22 0 /epickits create GOD auto 5000

Requirements:

  • Admin must hold an item.
  • Held item becomes the kit item.
  • Support color codes.
  • If slot is auto, choose next available slot automatically.
  • Validate slot range.
  • Save item completely.

---

Delete Kit

/epickits delete

Requirements:

  • Remove from kits.yml
  • Remove INVENTORY GUI placement
  • Remove all references safely

---

Give Kit

/epickits give

Example:

/epickits give EpicDev GOD 5

Requirements:

  • Give multiple copies
  • Support offline player validation
  • Proper error handling

---

Reload

/epickits reload

Requirements:

  • Reload config.yml
  • Reload kits.yml
  • Reload messages.yml
  • Keep cooldowns active
  • Never reset cooldowns
  • No memory leaks

---

INVENTORY INVENTORY GUI SYSTEM

Requirements:

  • Configurable INVENTORY GUI title
  • Configurable INVENTORY GUI size
  • Slot-based placement
  • Pagination support
  • Sound effects
  • Colored names
  • Async loading where safe
  • Fast inventory generation

Disabled kits must still be visible.

If disabled:

"This kit is currently unavailable."

Players cannot claim disabled kits.

---

KIT PREVIEW SYSTEM

Left Click:

Claim Kit

Right Click:

Preview Kit

Preview Requirements:

  • Read-only inventory
  • Cannot move items
  • Cannot take items
  • Supports all saved metadata

---

PERMISSION SYSTEM

Every kit must have its own permission.

Format:

epickits.kit.

Examples:

epickits.kit.starter epickits.kit.media epickits.kit.owner

If player lacks permission:

"You do not have permission to use this kit."

Requirements:

  • Fully compatible with LuckPerms
  • No automatic wildcard bypass
  • Explicit permissions only

Admin bypass:

epickits.bypass

Players with this permission ignore:

  • Cooldowns
  • Kit restrictions
  • Permission checks

---

COOLDOWN SYSTEM (MOST IMPORTANT)

Each kit must have its own cooldown.

Example:

starter: cooldown-seconds: 86400

media: cooldown-seconds: 259200

owner: cooldown-seconds: 604800

Cooldown display:

  • Days
  • Hours
  • Minutes
  • Seconds

Example:

"You can use this kit again in 2d 5h 12m 30s."

---

PERSISTENT COOLDOWN STORAGE

THIS MUST NEVER RESET.

Cooldowns must survive:

  • Server Restart
  • /reload
  • Plugman reload
  • Plugin reload
  • Server crash
  • Host reboot
  • Pterodactyl restart
  • Unexpected shutdown

Use cooldown expiration timestamps.

Store timestamps immediately after claim.

Never rely only on RAM.

Required file:

plugins/EpicKits/cooldowns.yml

Example:

players:

UUID: starter: expires: 1750000000000 owner: expires: 1755000000000

Requirements:

  • Save instantly after claim
  • Thread-safe saving
  • Data corruption protection
  • Auto cleanup expired cooldowns
  • Restore automatically on startup

---

BROADCAST SYSTEM

When a kit is claimed:

Player Message:

"You claimed the GOD kit worth $5000."

Broadcast Message:

"EpicDev claimed a kit worth $5000."

Requirements:

  • Fully configurable
  • Enable/Disable option

---

CONFIG FILES

Folder Structure:

plugins/ └── EpicKits/ ├── config.yml ├── kits.yml ├── messages.yml └── cooldowns.yml

---

CONFIG EXAMPLE

kits:

starter: display-name: "&aStarter" slot: 22 price: 0 enabled: true permission: "epickits.kit.starter" cooldown-seconds: 86400

---

MESSAGE SYSTEM

All messages configurable.

messages.yml

Support:

  • MiniMessage
  • Legacy Color Codes
  • PlaceholderAPI placeholders

Examples:

%player% %kit% %price% %cooldown% %claims%

---

PLACEHOLDERAPI SUPPORT

Provide placeholders:

%epickits_claims_% %epickits_cooldown_% %epickits_next_available_% %epickits_total_claims%

---

CLAIM STATISTICS

Track:

  • Total claims
  • Claims per player
  • Claims per kit

Store safely.

---

PERFORMANCE REQUIREMENTS

Must support:

  • 200+ kits
  • 500+ online players

Requirements:

  • Fast startup
  • Fast INVENTORY GUI opening
  • Async file saving
  • Cached kit loading
  • Minimal memory usage
  • No console spam
  • No deprecated APIs

---

SECURITY REQUIREMENTS

Prevent:

  • Item Duplication
  • Inventory Exploits
  • Cooldown Bypass
  • Data Corruption
  • Invalid Slot Crashes
  • NullPointerExceptions
  • Missing Config Crashes
  • Async Inventory Access Issues
  • Invalid Kit Names

Validate everything.

---

PROJECT STRUCTURE

Use clean architecture:

com.epicdev.epickits

├── EpicKits.java ├── commands ├── INVENTORY GUI ├── kit ├── cooldown ├── config ├── listeners ├── placeholders ├── storage ├── managers ├── utils

---

GENERATE

Generate complete plugin including:

•  full plugin

  • plugin.yml
  • pom.xml (Maven)
  • All Managers
  • INVENTORY GUI System
  • Kit Storage System
  • Cooldown Persistence System
  • PlaceholderAPI Expansion
  • Commands
  • Event Listeners
  • Config Loader
  • Utility Classes
  • Example Config Files

The final plugin must be production-ready, optimized, crash-safe, and guarantee that cooldowns NEVER reset even after restarts, reloads, crashes, or host reboots.

Kodari AI
KodariJun 14 at 2:29 pm 32

I’ll create a production-ready advanced kit system with persistent cooldowns, complete item preservation, and GUI-based management.

EpicKits
Advanced persistent kit system for Minecraft 1.21+ with GUI-based claiming, complete item preservation including NBT/shulker contents, persistent cooldowns that survive restarts, permission-based access, PlaceholderAPI support, statistics tracking, and broadcast notifications. Optimized for large SMP networks with 200+ kits and 500+ players.

EpicKits is now complete and production-ready!

✅ Key Features Implemented

Persistent Cooldown System

  • Cooldowns stored as expiration timestamps in cooldowns.yml

  • Auto-save after every claim (async by default)

  • Survives restarts, reloads, crashes, and reboots

  • Automatic cleanup of expired cooldowns

Complete Item Preservation

  • Base64 + BukkitObjectOutputStream serialization

  • Preserves NBT, shulker contents, custom model data, attributes, everything

GUI System

  • Configurable size and title with MiniMessage support

  • Left-click to claim, right-click to preview

  • Real-time cooldown display

  • Permission-based kit access

  • Visual status indicators (available/cooldown/disabled/no permission)

Statistics Tracking

  • Per-player kit claims

  • Total claims per kit

  • PlaceholderAPI integration

Admin Tools

  • /epickits create <name> <slot|auto> <cooldown> - Create from held item

  • /epickits delete <kit> - Remove kit

  • /epickits give <player> <kit> [amount] - Give kits

  • /epickits reload - Reload configs (cooldowns persist)

Performance Optimizations

  • Concurrent data structures for thread safety

  • Async file I/O

  • Cached kit loading

  • Lazy GUI initialization

  • Scheduled cooldown cleanup

Security

  • All inventory clicks cancelled in GUI

  • Preview mode is fully read-only

  • Validation on all commands

  • Thread-safe cooldown operations

The plugin uses modern Paper APIs, XSeries for cross-version compatibility, and follows all Kodari best practices for production SMP networks.

Kodari can make mistakes. Review important code before using.
Files
src
manifest.kod
pom.xml
Code
29 1,828
src/main/java/com/epicdev/epickits/EpicKits.java
package com.epicdev.epickits;

import com.epicdev.epickits.commands.EpicKitsCommand;
import com.epicdev.epickits.commands.KitsCommand;
import com.epicdev.epickits.config.ConfigManager;
import com.epicdev.epickits.config.CooldownConfig;
import com.epicdev.epickits.config.KitsConfig;
import com.epicdev.epickits.config.MessagesConfig;
import com.epicdev.epickits.cooldown.CooldownManager;
import com.epicdev.epickits.gui.GUIListener;
import com.epicdev.epickits.gui.GUIManager;
import com.epicdev.epickits.kit.KitManager;
import com.epicdev.epickits.listeners.PlayerJoinListener;
import com.epicdev.epickits.placeholders.EpicKitsExpansion;
import com.epicdev.epickits.storage.StatisticsStorage;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class EpicKits extends JavaPlugin {
    
    private ConfigManager configManager;
    private KitsConfig kitsConfig;
    private MessagesConfig messagesConfig;
    private CooldownConfig cooldownConfig;
    
    private KitManager kitManager;
    private CooldownManager cooldownManager;
    private GUIManager guiManager;
    private StatisticsStorage statisticsStorage;
    
    @Override
    public void onEnable() {
        initializeConfigs();
        initializeManagers();
        registerCommands();
        registerListeners();
        registerPlaceholders();
        startCleanupTask();
        
        getLogger().info("EpicKits has been enabled successfully!");
    }
    
    @Override
    public void onDisable() {
        if (cooldownManager != null) {
            cooldownManager.saveAllCooldowns();
        }
        if (statisticsStorage != null) {
            statisticsStorage.save();
        }
        
        getLogger().info("EpicKits has been disabled successfully!");
    }
    
    private void initializeConfigs() {
        configManager = new ConfigManager(this);
        kitsConfig = new KitsConfig(this);
        messagesConfig = new MessagesConfig(this);
        cooldownConfig = new CooldownConfig(this);
        
        configManager.load();
        kitsConfig.load();
        messagesConfig.load();
        cooldownConfig.load();
    }
    
    private void initializeManagers() {
        guiManager = new GUIManager();
        cooldownManager = new CooldownManager(this);
        statisticsStorage = new StatisticsStorage(this);
        kitManager = new KitManager(this);
        
        cooldownManager.loadAllCooldowns();
        statisticsStorage.load();
        kitManager.loadKits();
    }
    
    private void registerCommands() {
        getCommand("kits").setExecutor(new KitsCommand(this));
        getCommand("epickits").setExecutor(new EpicKitsCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
    }
    
    private void registerPlaceholders() {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new EpicKitsExpansion(this).register();
            getLogger().info("PlaceholderAPI expansion registered!");
        }
    }
    
    private void startCleanupTask() {
        if (configManager.isCleanupExpiredCooldowns()) {
            long interval = configManager.getCleanupIntervalMinutes() * 20L * 60L;
            Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
                cooldownManager.cleanupExpiredCooldowns();
            }, interval, interval);
        }
    }
    
    public void reloadPlugin() {
        configManager.load();
        kitsConfig.load();
        messagesConfig.load();
        cooldownConfig.load();
        
        kitManager.loadKits();
    }
}