Vikronix

🧠 🔥 AXESMP CORE – FINAL PRODUCTION PROMPT

Create a high-performance, production-ready Paper plugin (1.20+) named AxeSMP-Core.

This plugin must implement a secure axe-kill system + custom currency (SlicedSoul) designed for a competitive SMP server.

The plugin must be fully configurable, modular, optimized, and exploit-proof, with zero unnecessary features and no overlap with other plugins.

🪓 CORE MECHANIC

When a player kills another player using a configured axe:

Award SlicedSoul currency

Execute configurable commands

Track kill stats + streaks

✔ Strict validation:

Final hit MUST be from an axe

Only real PvP kills (no fall/lava/indirect)

No duplicate event triggers

💎 SLICEDSOUL SYSTEM (CORE) Commands:

/souls → view balance

/souls give <player> <amount>

/souls take <player> <amount>

/souls set <player> <amount>

/souls reset <player>

/souls top → leaderboard

✔ Requirements:

UUID-based storage

Prevent negative balances

Prevent overflow & duplication

Permission-based admin control

Fully configurable messages

⚙️ AXES SYSTEM (axes.yml)

Fully configurable axes:

Support:

Vanilla axes (material)

Custom axes (name + lore)

Each axe can define:

SlicedSoul reward

Custom commands executed on kill

✔ Must:

Match items safely (no false positives)

Prevent spoofed items / renamed items exploit

🔥 KILL STREAK SYSTEM

Track consecutive axe kills

Configurable milestones (e.g. 5, 10, 15)

Broadcast + optional reward commands

✔ Reset on death ✔ Fully configurable

🏆 LEADERBOARD SYSTEM

/souls top → top 10 players

Async + cached

Configurable refresh interval

✔ No lag spikes ✔ No sync database calls

🛡️ ANTI-FARM / ANTI-EXPLOIT (CRITICAL)

Must prevent:

✔ Alt farming ✔ Same player kill loops ✔ Boosting

Implement:

Kill cooldown per killer→victim

Diminishing rewards system

Kill history tracking (UUID-based)

Optional IP-based detection (if available)

✔ Configurable punishments:

reduce rewards

block rewards

⚡ COMMAND ENGINE

Execute commands on kill

Placeholders:

%killer%

%victim%

%souls%

%streak%

✔ Must:

Never execute twice

Be safe from race conditions

🧠 DATA & PERFORMANCE Data:

SQLite (default) + MySQL support

Async read/write ONLY

Write queue system (no spam writes)

Safe shutdown save

Performance:

No heavy main-thread tasks

Use efficient caches (with expiration)

Scheduled cleanup tasks

Zero memory leaks

🧼 EXPLOIT PROTECTION (STRICT)

Must handle ALL edge cases:

Double death events

Plugin reload duplication

Server crash mid-transaction

Player disconnect during kill

Rapid hit events

Self-kill or invalid kill

✔ All transactions must be:

atomic

validated before applying

🧱 ARCHITECTURE (CLEAN)

Modular system:

AxeKillListener

AxeManager

SoulManager

StreakManager

AntiFarmManager

LeaderboardManager

CommandEngine

DataManager

ConfigManager

✔ Follow:

SOLID principles

No deprecated API

Defensive programming

Null safety

🔌 DEPENDENCIES (SAFE)

Use ONLY lightweight and stable libraries:

PlaceholderAPI (optional)

Vault (optional)

❌ DO NOT use heavy protocol libraries unless strictly necessary

✔ All dependencies must be:

soft-depend

safely handled

never crash server if missing

💬 MESSAGES SYSTEM

All messages in messages.yml

Support placeholders

Support color codes / MiniMessage

Toggle any message

🧪 TESTING REQUIREMENTS

Ensure:

No duplication exploits

No relog abuse

No farming same player

Stable under high PvP load

Accurate axe detection

📦 OUTPUT

Full source code

plugin.yml

config.yml

messages.yml

axes.yml

Setup instructions

🎯 FINAL GOAL

Build this as a premium, optimized SMP core plugin that is:

Clean

Fast

Fully configurable

Exploit-proof

Scalable

No unnecessary features. No lag. No duplication bugs.

Use concurrency-safe patterns, atomic transactions, and strict validation to ensure no exploits, dupes, or race conditions are possible.

Kodari AI
KodariMar 19 at 3:06 pm 25,209 (v2)

I’ll create a production-ready AxeSMP-Core plugin with strict exploit prevention and optimized performance.

AxeSMPCore
High-performance PvP economy plugin for competitive SMP servers. Features secure axe-kill validation with SlicedSoul currency rewards, kill streak tracking with configurable milestones, anti-farm protection with cooldowns and diminishing rewards, async leaderboard system, and command execution engine. Includes UUID-based storage with SQLite/MySQL support, write queue optimization, and comprehensive exploit prevention for alt farming and boosting.

Production-ready AxeSMP-Core plugin created with:

Core Features:

  • ✅ Secure axe-kill validation (checks weapon in hand at death)

  • ✅ SlicedSoul economy with full command suite

  • ✅ Kill streak system with configurable milestones

  • ✅ Anti-farm protection (cooldowns + diminishing rewards)

  • ✅ Async leaderboard with caching

  • ✅ Command execution engine with placeholders

Exploit Prevention:

  • ✅ UUID-based tracking

  • ✅ Thread-safe concurrent maps

  • ✅ Cooldown system per killer→victim pair

  • ✅ Diminishing rewards for repeated kills

  • ✅ Write queue for database batching

  • ✅ Self-kill prevention

  • ✅ Proper async/sync context handling

Performance Optimizations:

  • ✅ HikariCP connection pooling

  • ✅ Async database operations

  • ✅ Cached leaderboard with auto-refresh

  • ✅ Batch save system

  • ✅ Cleanup tasks for expired data

Configuration:

  • ✅ SQLite (default) + MySQL support

  • ✅ Fully customizable axes with vanilla/custom support

  • ✅ Configurable messages with placeholders

  • ✅ Flexible anti-farm settings

  • ✅ Milestone rewards and broadcasts

All systems are modular, exploit-proof, and optimized for high-load PvP servers.

Vikronix

make it 1.21 to 1.21.11

Kodari AI
KodariMar 19 at 3:43 pm 4,126 (v2)

Updated API version to 1.21 for compatibility with Minecraft 1.21 through 1.21.11.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
23 1,850
src/main/java/com/axesmp/core/AxeSMPCore.java
package com.axesmp.core;

import com.axesmp.core.command.SoulsCommand;
import com.axesmp.core.listener.AxeKillListener;
import com.axesmp.core.listener.PlayerListener;
import com.axesmp.core.manager.AntiFarmManager;
import com.axesmp.core.manager.AxeManager;
import com.axesmp.core.manager.CommandEngine;
import com.axesmp.core.manager.ConfigManager;
import com.axesmp.core.manager.DataManager;
import com.axesmp.core.manager.LeaderboardManager;
import com.axesmp.core.manager.SoulManager;
import com.axesmp.core.manager.StreakManager;
import com.axesmp.core.util.MessageUtil;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AxeSMPCore extends JavaPlugin {
    private ConfigManager configManager;
    private DataManager dataManager;
    private AxeManager axeManager;
    private SoulManager soulManager;
    private StreakManager streakManager;
    private AntiFarmManager antiFarmManager;
    private LeaderboardManager leaderboardManager;
    private CommandEngine commandEngine;
    private MessageUtil messageUtil;
    
    private int saveTaskId;
    private int cleanupTaskId;
    
    @Override
    public void onEnable() {
        long startTime = System.currentTimeMillis();
        
        this.configManager = new ConfigManager(this);
        this.dataManager = new DataManager(this);
        this.axeManager = new AxeManager(this);
        this.soulManager = new SoulManager(this);
        this.streakManager = new StreakManager(this);
        this.antiFarmManager = new AntiFarmManager(this);
        this.leaderboardManager = new LeaderboardManager(this);
        this.commandEngine = new CommandEngine(this);
        this.messageUtil = new MessageUtil(this);
        
        registerListeners();
        registerCommands();
        startTasks();
        
        loadOnlinePlayers();
        
        long loadTime = System.currentTimeMillis() - startTime;
        getLogger().info("AxeSMP-Core enabled in " + loadTime + "ms");
        getLogger().info("Loaded " + axeManager.getAxes().size() + " configured axes");
    }
    
    @Override
    public void onDisable() {
        if (saveTaskId != -1) {
            Bukkit.getScheduler().cancelTask(saveTaskId);
        }
        
        if (cleanupTaskId != -1) {
            Bukkit.getScheduler().cancelTask(cleanupTaskId);
        }
        
        if (leaderboardManager != null) {
            leaderboardManager.shutdown();
        }
        
        if (soulManager != null) {
            soulManager.saveAll();
        }
        
        if (dataManager != null) {
            dataManager.shutdown();
        }
        
        getLogger().info("AxeSMP-Core disabled successfully");
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new AxeKillListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
    }
    
    private void registerCommands() {
        SoulsCommand soulsCommand = new SoulsCommand(this);
        getCommand("souls").setExecutor(soulsCommand);
        getCommand("souls").setTabCompleter(soulsCommand);
    }
    
    private void startTasks() {
        int saveIntervalMinutes = configManager.getInt("general.save-interval-minutes", 5);
        long saveIntervalTicks = saveIntervalMinutes * 60 * 20L;
        
        saveTaskId = Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
            soulManager.saveAll();
            if (configManager.debug()) {
                getLogger().info("Auto-saved all player data");
            }
        }, saveIntervalTicks, saveIntervalTicks).getTaskId();
        
        cleanupTaskId = Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
            antiFarmManager.cleanup();
            if (configManager.debug()) {
                getLogger().info("Cleaned up anti-farm data");
            }
        }, 6000L, 6000L).getTaskId();
    }
    
    private void loadOnlinePlayers() {
        Bukkit.getScheduler().runTaskLater(this, () -> {
            for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) {
                soulManager.loadPlayer(player);
            }
            getLogger().info("Loaded data for " + Bukkit.getOnlinePlayers().size() + " online players");
        }, 20L);
    }
}