soonmedia12

Can u make me a random plugin

Kodari AI
KodariApr 28 at 9:27 pm 462 (v2)

I’ll create a Lucky Blocks plugin where players break special blocks to receive random rewards and effects.

LuckyBlocks
A fun and customizable Lucky Blocks plugin that creates special blocks which grant random rewards when broken. Features include configurable reward pools with customizable chances, support for items, commands, effects, and messages. Players receive surprise rewards ranging from valuable items to potion effects or even custom commands. Admins can give lucky blocks via commands and configure all aspects of the reward system including weights, sounds, and particles.

[Generation stopped]

soonmedia12

Continue

Kodari AI
KodariApr 28 at 9:28 pm 936 (v2)

[Generation stopped]

soonmedia12

Can u make me a economy for my server it had it own place holders connected to vault so we can make money and all that add everything like donutsmp economy

Kodari AI
KodariApr 28 at 9:32 pm 1,226 (v2)

I’ll create a complete economy plugin with Vault integration, PlaceholderAPI support, and all essential features like balance management, transactions, baltop, and more.

I’ll create a complete economy plugin from scratch with all the features you need!

Done! I’ve created a complete economy plugin with:

Features:

  • ✅ Full balance management (view, set, give, take, reset)

  • ✅ Player-to-player payments with configurable tax

  • ✅ Baltop/leaderboard system with pagination

  • ✅ Vault integration (other plugins can use your economy)

  • ✅ PlaceholderAPI support with multiple placeholders

  • ✅ JSON data storage with auto-save

  • ✅ Configurable currency, limits, and messages

  • ✅ Starting balance for new players

Commands:

  • /balance [player] - Check balance

  • /pay <player> <amount> - Send money

  • /eco <give|take|set|reset> <player> [amount] - Admin commands

  • /baltop [page] - View richest players

Placeholders: (use with %economy_<placeholder>%)

  • balance

[Generation stopped]

soonmedia12

Can u make me a economy for my server it had it own place holders connected to vault so we can make money and all that add everything like donutsmp economy with the placeholder like daylighteconomy_kills and do that for money death playtime etc

Kodari AI
KodariApr 28 at 9:56 pm 36,717 (v2)

I’ll enhance the economy plugin to track kills, deaths, playtime, and more with full placeholder support!

Now I’ll add comprehensive stats tracking with custom placeholders!

Done! I’ve created a complete economy plugin with comprehensive stats tracking:

Features:

  • ✅ Full economy system with Vault integration

  • ✅ Player statistics tracking (kills, deaths, playtime, blocks, messages, jumps, damage, joins)

  • ✅ PlaceholderAPI with custom identifier daylighteconomy_

  • ✅ JSON storage for both balances and stats

  • ✅ Auto-save and playtime tracking

Placeholders (use %daylighteconomy_<placeholder>%):

  • money, balance, bal - Player balance

  • money_formatted, balance_formatted - With currency symbol

  • kills - Total kills

  • deaths - Total deaths

  • kdr - Kill/Death ratio

  • playtime - Playtime in seconds

  • playtime_formatted - Formatted (e.g., “5d 3h 20m”)

  • blocks_broken - Blocks broken

  • blocks_placed - Blocks placed

  • messages_sent - Chat messages sent

  • jumps - Total jumps

  • damage_dealt - Total damage dealt

  • damage_taken - Total damage taken

  • joins - Times joined server

  • rank - Baltop rank

Commands:

  • /balance [player] - Check balance

  • /pay <player> <amount> - Send money

  • /eco <give|take|set|reset> <player> [amount] - Admin commands

  • /baltop [page] - View richest players

  • /stats [player] - View player statistics

All stats are automatically tracked and saved!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
17 1,939
src/main/java/com/servereconomy/ServerEconomy.java
package com.servereconomy;

import com.servereconomy.commands.*;
import com.servereconomy.economy.EconomyManager;
import com.servereconomy.economy.VaultEconomyProvider;
import com.servereconomy.hooks.PlaceholderAPIHook;
import com.servereconomy.listeners.PlayerStatsListener;
import com.servereconomy.stats.StatsManager;
import com.servereconomy.storage.DataStorage;
import com.servereconomy.storage.JSONStorage;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class ServerEconomy extends JavaPlugin {
    
    private EconomyManager economyManager;
    private StatsManager statsManager;
    private DataStorage dataStorage;
    private VaultEconomyProvider vaultProvider;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        dataStorage = new JSONStorage(this);
        dataStorage.load();
        
        economyManager = new EconomyManager(this);
        statsManager = new StatsManager(this);
        
        registerCommands();
        registerListeners();
        registerVault();
        registerPlaceholderAPI();
        
        startAutoSave();
        startPlaytimeTracker();
        
        getLogger().info("ServerEconomy has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (dataStorage != null) {
            dataStorage.save();
        }
        
        getLogger().info("ServerEconomy has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("balance").setExecutor(new BalanceCommand(this));
        getCommand("pay").setExecutor(new PayCommand(this));
        getCommand("eco").setExecutor(new EcoCommand(this));
        getCommand("baltop").setExecutor(new BaltopCommand(this));
        getCommand("stats").setExecutor(new StatsCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerStatsListener(this), this);
    }
    
    private void registerVault() {
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            getLogger().warning("Vault not found! Other plugins won't be able to use this economy.");
            return;
        }
        
        vaultProvider = new VaultEconomyProvider(this);
        Bukkit.getServicesManager().register(
            net.milkbowl.vault.economy.Economy.class,
            vaultProvider,
            this,
            ServicePriority.Highest
        );
        
        getLogger().info("Vault economy provider registered!");
    }
    
    private void registerPlaceholderAPI() {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") == null) {
            return;
        }
        
        new PlaceholderAPIHook(this).register();
        getLogger().info("PlaceholderAPI expansion registered!");
    }
    
    private void startAutoSave() {
        int interval = getConfig().getInt("storage.auto-save-interval", 5) * 60 * 20;
        
        Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
            dataStorage.save();
        }, interval, interval);
    }
    
    private void startPlaytimeTracker() {
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            Bukkit.getOnlinePlayers().forEach(player -> {
                statsManager.incrementPlaytime(player.getUniqueId(), 60);
            });
        }, 1200L, 1200L);
    }
    
    public String formatBalance(double amount) {
        int decimals = getConfig().getInt("economy.decimal-places", 2);
        return String.format("%." + decimals + "f", amount);
    }
    
    public String getCurrencySymbol() {
        return getConfig().getString("economy.currency-symbol", "$");
    }
    
    public String getCurrencyName(double amount) {
        if (amount == 1.0) {
            return getConfig().getString("economy.currency-name", "Dollar");
        }
        return getConfig().getString("economy.currency-name-plural", "Dollars");
    }
    
    public String colorize(String message) {
        return org.bukkit.ChatColor.translateAlternateColorCodes('&', message);
    }
}