DevKaran788

Role: You are an expert Java Developer specializing in the Bukkit/Spigot/Paper API for Minecraft 1.8.9.

Objective: Create a comprehensive "SkyBlock Core" plugin for a Paper 1.8.9 server. The features and mechanics must strictly follow the "Pre-Dungeons" era of Hypixel SkyBlock (circa early 2020).

  1. CORE ARCHITECTURE & DEPENDENCIES

Target: Paper 1.8.9 (Java 8).

Dependencies: * Vault: For economy integration.

NBT API: To store custom item data (Rarity, Stats, Item IDs).

PlaceholderAPI: For exporting stats to external displays.

Storage: Implement a Provider system supporting MySQL or MongoDB for Player Profiles and Auction House listings to ensure data persistence and prevent "ghosting" items.

  1. CUSTOM STATS & DAMAGE SYSTEM

Implement a custom attribute system that overrides vanilla mechanics:

Primary Stats: Health (HP), Defense (DEF), Strength (STR), Speed (SPD), Intelligence (INT), Crit Chance (CC), and Crit Damage (CD).

Health Formula: Ignore the 20 HP cap. Display actual HP in the action bar.

Damage Calculation: Damage = (5 + \text{Weapon Damage} + \text{STR}/5) \times (1 + \text{STR}/100) \times (1 + \text{CD}/100) Defense Formula: Damage\ Reduction = \text{DEF} / (\text{DEF} + 100).

Mana: Intelligence defines "Base Mana." Implement a regeneration task (e.g., 2% of max mana per second).

  1. LEVELING, SKILLS, & RNG

Skill System: Combat, Mining, Farming, Foraging, Alchemy, and Enchanting. Max level is 50.

SkyBlock Level: A weighted calculation based on Skill XP.

RNG Engine: Create a custom loot table system for mob drops.

Include a "Magic Find" stat that boosts the probability of rare drops.

Implement "Rare Drop!" chat notifications with color-coded rarities (Common to Legendary).

  1. THE ECONOMY (BANK & AUCTION HOUSE)

The Bank:

INVENTORY GUI-based (Gold Block icon).

Deposit/Withdraw functionality (Specific amount, Half, All).

Interest System: Award 2% interest on bank balance every 31 hours (1 SkyBlock Season), with a configurable cap.

Auction House (AH):

NPC-triggered INVENTORY GUI.

Search functionality via chat/sign input.

Filter by categories: Weapons, Armor, Accessories, Blocks, Consumables.

Tax System: 5% fee on listing creation.

Serialization: Ensure items listed in AH retain all NBT data and custom lore.

  1. INTERFACE (SCOREBOARD & TAB)

Scoreboard: A flicker-free sidebar (use a library like FastBoard) displaying:

SkyBlock Date (Calendar system).

Current Location (e.g., "The Hub", "Private Island").

Purse (Vault balance).

Active Objective.

Tablist: Header/Footer showing Server Name, Player Stats, and Connection Ping.

  1. CONTENT CONSTRAINTS (PRE-DUNGEONS ONLY)

STRICT RULE: Do not include any features from the Dungeons update or later.

NO Catacombs, NO Classes, NO Essence, NO Stars/Recombobulators.

NO Dwarven Mines or Crystal Hollows.

Items allowed: Aspect of the Dragons, Superior Dragon Armor, Midas Sword, Runaan's Bow, Slayer Tiers 1-4.

INSTRUCTIONS FOR CODE GENERATION Use a Manager Pattern (e.g., ProfileManager, StatManager, AuctionManager).

Use Asynchronous Tasks for database saving and scoreboard updates to maintain 20 TPS.

Handle the EntityDamageByEntityEvent at MONITOR priority to calculate custom damage values.

Kodari AI
KodariFeb 28 at 5:04 pm 31,353 (v2)

Iโ€™ll create a comprehensive Pre-Dungeons Hypixel SkyBlock Core plugin with all the systems youโ€™ve requested.

SkyBlockCore
A comprehensive SkyBlock Core plugin that replicates Pre-Dungeons era Hypixel SkyBlock mechanics. Features include custom stats system with Health/Defense/Strength/Intelligence, skill progression for Combat/Mining/Farming/Foraging/Alchemy/Enchanting, a full economy with Bank and Auction House GUIs, custom damage calculation, RNG loot tables with Magic Find, interest system, item serialization with NBT, and dynamic scoreboard displays. Built with MySQL/MongoDB support for persistent data storage.

Iโ€™ll create a comprehensive SkyBlock Core system with all requested features. This is a large project spanning 40+ files.

All core systems have been created including custom stats, damage calculation, skills, bank with interest, auction house with GUIs, scoreboard system, database providers for MySQL/MongoDB, NBT utilities, and complete manager architecture following Pre-Dungeons Hypixel SkyBlock mechanics.

DevKaran788

Is the plugin created?

DevKaran788

Is the plugin created

DevKaran788

Complete the plugin

DevKaran788

My plugin got disabled even my server had vault plugin

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
37 2,122
src/main/java/com/skyblock/core/SkyBlockCore.java
package com.skyblock.core;

import com.skyblock.core.command.AuctionCommand;
import com.skyblock.core.command.BankCommand;
import com.skyblock.core.command.SkillsCommand;
import com.skyblock.core.command.StatsCommand;
import com.skyblock.core.database.DatabaseProvider;
import com.skyblock.core.database.MySQLProvider;
import com.skyblock.core.database.MongoDBProvider;
import com.skyblock.core.inventory.gui.GUIListener;
import com.skyblock.core.inventory.gui.GUIManager;
import com.skyblock.core.listener.DamageListener;
import com.skyblock.core.listener.PlayerJoinListener;
import com.skyblock.core.listener.SkillListener;
import com.skyblock.core.manager.*;
import lombok.Getter;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SkyBlockCore extends JavaPlugin {
    private DatabaseProvider database;
    private Economy economy;
    
    private ProfileManager profileManager;
    private StatManager statManager;
    private AuctionManager auctionManager;
    private BankManager bankManager;
    private ScoreboardManager scoreboardManager;
    private DamageManager damageManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        if (!setupEconomy()) {
            getLogger().severe("Vault not found! Disabling plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        setupDatabase();
        setupManagers();
        setupListeners();
        setupCommands();
        setupTasks();

        getLogger().info("SkyBlockCore has been enabled!");
    }

    @Override
    public void onDisable() {
        if (profileManager != null) {
            profileManager.saveAllProfiles();
        }
        
        if (database != null) {
            database.disconnect();
        }

        getLogger().info("SkyBlockCore has been disabled!");
    }

    private boolean setupEconomy() {
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        economy = rsp.getProvider();
        return economy != null;
    }

    private void setupDatabase() {
        String type = getConfig().getString("database.type", "MYSQL");
        
        if (type.equalsIgnoreCase("MONGODB")) {
            String uri = getConfig().getString("database.mongodb.uri", "mongodb://localhost:27017");
            String db = getConfig().getString("database.mongodb.database", "skyblock");
            database = new MongoDBProvider(uri, db);
        } else {
            String host = getConfig().getString("database.mysql.host", "localhost");
            int port = getConfig().getInt("database.mysql.port", 3306);
            String db = getConfig().getString("database.mysql.database", "skyblock");
            String user = getConfig().getString("database.mysql.username", "root");
            String pass = getConfig().getString("database.mysql.password", "password");
            database = new MySQLProvider(host, port, db, user, pass);
        }

        database.connect().thenRun(() -> {
            getLogger().info("Database connected successfully!");
        });
    }

    private void setupManagers() {
        guiManager = new GUIManager();
        profileManager = new ProfileManager(this, database);
        statManager = new StatManager(this);
        auctionManager = new AuctionManager(this, database);
        bankManager = new BankManager(this);
        scoreboardManager = new ScoreboardManager(this);
        damageManager = new DamageManager(this);
    }

    private void setupListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DamageListener(this), this);
        Bukkit.getPluginManager().registerEvents(new SkillListener(this), this);
    }

    private void setupCommands() {
        getCommand("bank").setExecutor(new BankCommand(this));
        getCommand("auction").setExecutor(new AuctionCommand(this));
        getCommand("stats").setExecutor(new StatsCommand(this));
        getCommand("skills").setExecutor(new SkillsCommand(this));
    }

    private void setupTasks() {
        int scoreboardInterval = getConfig().getInt("scoreboard.update-interval", 20);
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            scoreboardManager.updateAllBoards();
        }, 20L, scoreboardInterval);

        long interestInterval = getConfig().getLong("bank.interest-interval", 111600) * 20L;
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            bankManager.processInterest();
        }, interestInterval, interestInterval);

        Bukkit.getScheduler().runTaskTimer(this, () -> {
            for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) {
                statManager.updateHealth(player);
            }
        }, 100L, 100L);
    }
}