your.anon.one
📎 1 file 3,928 chars
📄
pasted-code-1775841663769.txt
txt 179 lines
▶
You are a senior Java developer specialized in Minecraft server systems and scalable minigame design.

Create a production-ready Free For All (FFA) plugin for Spigot/Paper.

The plugin must include a complete progression system, ranks, persistence, and optimized performance.

========================================
1. CORE SYSTEM
========================================
- FFA arena system:
  - Spawn points (randomized)
  - Instant respawn on death
  - Kit system (default kit + configurable kits)
- Players fight continuously (no rounds)

========================================
2. PLAYER DATA SYSTEM (IMPORTANT)
========================================
Track per player:
- Kills
- Deaths
- Killstreak
- Best killstreak
- Level
- XP
- Rank

- Store data:
  - Use SQLite or MySQL
  - Async saving/loading (no lag)
  - Cache data in memory

========================================
3. LEVEL & XP SYSTEM
========================================
- Players gain XP from:
  - Kills
  - Killstreak bonuses
- XP formula should scale:
  - Higher levels require more XP

Use a formula like:
- XP Required = base + (level * multiplier)

- On level up:
  - Send title + message
  - Play sound
  - Optional rewards

========================================
4. RANK SYSTEM
========================================
Create rank tiers based on level or stats:

Example:
- Rookie (Level 1–5)
- Fighter (6–15)
- Warrior (16–30)
- Elite (31–50)
- Legend (50+)

- Each rank:
  - Has prefix
  - Shows in chat + scoreboard

========================================
5. COMBAT FEATURES
========================================
- Killstreak system:
  - Announce streaks (5, 10, 15…)
- Heal on kill (configurable)
- Anti-clean system (optional small resistance after respawn)
- Disable fall damage (optional)

========================================
6. SCOREBOARD
========================================
Display:
- Kills
- Deaths
- KD ratio
- Level
- Rank
- Killstreak

Update in real-time

========================================
7. UI / FEEDBACK
========================================
- Action bar:
  - Show XP gained
- Titles:
  - Level up
  - Killstreaks
- Chat messages:
  - Clean and minimal

========================================
8. COMMANDS
========================================
- /ffa join
- /ffa leave
- /ffa stats [player]
- /ffa top (leaderboard)
- /ffa kit

Admin:
- /ffa setspawn
- /ffa reload

========================================
9. LEADERBOARDS
========================================
- Top players by:
  - Kills
  - Level
- Hologram OR command output

========================================
10. PERFORMANCE
========================================
- Handle 50–100 players smoothly
- Async database
- Efficient event handling
- No heavy loops

========================================
11. CONFIG SYSTEM
========================================
- Configurable:
  - XP rewards
  - Rank thresholds
  - Spawn points
  - Kits
  - Messages

========================================
12. ANTI-ABUSE
========================================
- Prevent farming:
  - Same player kill cooldown
- Anti-boost detection

========================================
13. BRANDING
========================================
- Plugin name: CreepyFFA
- Author: Creepy

- Prefix:
  [CreepyFFA]

- Startup message:
  "CreepyFFA enabled. Created by Creepy."

========================================
OUTPUT
========================================
Provide:

1. Full plugin structure
2. Main class
3. PlayerData system
4. Database manager (SQLite or MySQL)
5. XP + Level system
6. Rank system
7. Kill handling logic
8. Scoreboard system
9. Commands implementation
10. Example config.yml
11. plugin.yml

Code must be:
- Clean
- Modular
- Optimized
- Ready to compile
Kodari AI
KodariApr 10 at 5:24 pm 24,418 (v2)

I’ll create a production-ready FFA plugin with complete progression, persistence, and optimization.

CreepyFFA
A high-performance Free For All combat plugin featuring a complete progression system with levels, ranks, and XP. Players battle continuously in arenas, earning experience and climbing ranks. Includes persistent stats tracking via MySQL/SQLite, real-time scoreboards, killstreak bonuses, configurable kits, admin controls, and anti-farming protection. Optimized for 50-100 concurrent players with async database operations.

CreepyFFA is ready to compile. Complete FFA system with:

  • Persistent stats (SQLite/MySQL via HikariCP)

  • XP/Level progression with configurable formula

  • Dynamic rank system

  • Real-time scoreboards

  • Killstreak tracking & announcements

  • Anti-farming protection with cooldowns

  • Folia-compatible scheduling

  • Heal on kill & anti-clean mechanics

  • Full command suite & leaderboards

  • Optimized for 50-100 players with async database operations

your.anon.one
📎 1 file 2,682 chars
📄
pasted-code-1775842180888.txt
txt 111 lines
▶
You are a senior Java developer debugging and improving an existing Minecraft FFA plugin.

The plugin currently has issues:
- Kits are not working correctly
- No XP progress bar is implemented
- Chat does not display player rank/prefix
- There are compilation/runtime errors

Your task is to FIX and COMPLETE the system, not rewrite everything.

========================================
1. FIX KIT SYSTEM (CRITICAL)
========================================
- Ensure /ffa kit command works properly
- Players must:
  - Select a kit
  - Receive items on spawn/respawn
- Fix issues like:
  - Items not given
  - Inventory not cleared
  - Kit not saved per player

- Add:
  - KitManager class
  - Store selected kit in PlayerData
  - Give kit on PlayerRespawnEvent

========================================
2. XP PROGRESS BAR (ACTION BAR)
========================================
- Create a visual progress bar showing XP progress to next level

Example:
[██████░░░░░░] 60%

- Show in action bar:
  - Current XP / Required XP
  - Level

- Update:
  - On kill
  - On XP gain
  - Every few seconds

- Must be smooth and not spammy

========================================
3. CHAT FORMAT WITH RANK
========================================
- Modify chat format to include rank prefix

Example:
[Elite] PlayerName: message

- Use:
  - AsyncPlayerChatEvent
- Format should include:
  - Rank prefix
  - Player name
  - Message

- Make rank dynamic based on PlayerData

========================================
4. FIX ERRORS (IMPORTANT)
========================================
- Identify and fix:
  - NullPointerExceptions
  - Incorrect event usage
  - Missing registrations
  - Wrong imports
  - Threading issues

- Ensure:
  - All listeners are registered
  - No async violations (Bukkit API on main thread)

========================================
5. DATA CONSISTENCY
========================================
- Ensure PlayerData:
  - Loads on join
  - Saves on quit
  - Is never null

========================================
6. CLEAN CODE
========================================
- Refactor messy code
- Remove duplicates
- Add proper structure

========================================
OUTPUT
========================================
Provide:

1. Fixed KitManager + example kit
2. Updated PlayerData (with selected kit)
3. Code for giving kits on spawn
4. Action bar XP progress bar system
5. Chat format listener with rank
6. Fixed command handling (/ffa kit)
7. Fixes for common errors with explanations

Code must be:
- Working
- Clean
- Ready to compile
- No placeholders
your.anon.one
📎 1 file 2,682 chars
📄
pasted-code-1775842195905.txt
txt 111 lines
▶
You are a senior Java developer debugging and improving an existing Minecraft FFA plugin.

The plugin currently has issues:
- Kits are not working correctly
- No XP progress bar is implemented
- Chat does not display player rank/prefix
- There are compilation/runtime errors

Your task is to FIX and COMPLETE the system, not rewrite everything.

========================================
1. FIX KIT SYSTEM (CRITICAL)
========================================
- Ensure /ffa kit command works properly
- Players must:
  - Select a kit
  - Receive items on spawn/respawn
- Fix issues like:
  - Items not given
  - Inventory not cleared
  - Kit not saved per player

- Add:
  - KitManager class
  - Store selected kit in PlayerData
  - Give kit on PlayerRespawnEvent

========================================
2. XP PROGRESS BAR (ACTION BAR)
========================================
- Create a visual progress bar showing XP progress to next level

Example:
[██████░░░░░░] 60%

- Show in action bar:
  - Current XP / Required XP
  - Level

- Update:
  - On kill
  - On XP gain
  - Every few seconds

- Must be smooth and not spammy

========================================
3. CHAT FORMAT WITH RANK
========================================
- Modify chat format to include rank prefix

Example:
[Elite] PlayerName: message

- Use:
  - AsyncPlayerChatEvent
- Format should include:
  - Rank prefix
  - Player name
  - Message

- Make rank dynamic based on PlayerData

========================================
4. FIX ERRORS (IMPORTANT)
========================================
- Identify and fix:
  - NullPointerExceptions
  - Incorrect event usage
  - Missing registrations
  - Wrong imports
  - Threading issues

- Ensure:
  - All listeners are registered
  - No async violations (Bukkit API on main thread)

========================================
5. DATA CONSISTENCY
========================================
- Ensure PlayerData:
  - Loads on join
  - Saves on quit
  - Is never null

========================================
6. CLEAN CODE
========================================
- Refactor messy code
- Remove duplicates
- Add proper structure

========================================
OUTPUT
========================================
Provide:

1. Fixed KitManager + example kit
2. Updated PlayerData (with selected kit)
3. Code for giving kits on spawn
4. Action bar XP progress bar system
5. Chat format listener with rank
6. Fixed command handling (/ffa kit)
7. Fixes for common errors with explanations

Code must be:
- Working
- Clean
- Ready to compile
- No placeholders
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
19 1,524
src/main/java/com/creepy/creepyffa/CreepyFFA.java
package com.creepy.creepyffa;

import com.creepy.creepyffa.commands.FFACommand;
import com.creepy.creepyffa.config.ConfigManager;
import com.creepy.creepyffa.database.DatabaseManager;
import com.creepy.creepyffa.listeners.CombatListener;
import com.creepy.creepyffa.listeners.JoinQuitListener;
import com.creepy.creepyffa.manager.*;
import com.tcoded.folialib.FoliaLib;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CreepyFFA extends JavaPlugin {
    
    private FoliaLib foliaLib;
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private ArenaManager arenaManager;
    private KitManager kitManager;
    private LevelManager levelManager;
    private RankManager rankManager;
    private ScoreboardManager scoreboardManager;
    private CombatManager combatManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.foliaLib = new FoliaLib(this);
        this.configManager = new ConfigManager(this);
        
        this.databaseManager = new DatabaseManager(this);
        this.databaseManager.initialize();
        
        this.arenaManager = new ArenaManager(this);
        this.kitManager = new KitManager(this);
        this.levelManager = new LevelManager(this);
        this.rankManager = new RankManager(this);
        this.scoreboardManager = new ScoreboardManager(this);
        this.combatManager = new CombatManager(this);
        
        getCommand("ffa").setExecutor(new FFACommand(this));
        
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new JoinQuitListener(this), this);
        
        this.scoreboardManager.startUpdateTask();
        
        getLogger().info("CreepyFFA enabled. Created by Creepy.");
    }
    
    @Override
    public void onDisable() {
        if (this.foliaLib != null) {
            this.foliaLib.getScheduler().cancelAllTasks();
        }
        
        if (this.databaseManager != null) {
            this.databaseManager.shutdown();
        }
        
        getLogger().info("CreepyFFA disabled.");
    }
}