yuk1azzz

can you make me an invsetment plugin that has bitcoin and etc, you can buy it with a INVENTORY GUI and the command to open the INVENTORY GUI is /invest both coins go up and down in price you can see how much % it goes down or up with the lore

Kodari AI
KodariFeb 8 at 12:45 am 13,198 (v2)

I’ll create a cryptocurrency investment plugin with a GUI system and fluctuating prices.

CryptoInvest
A cryptocurrency investment simulation plugin featuring Bitcoin, Ethereum, and other digital currencies. Players can buy and sell cryptocurrencies through an interactive GUI accessed via /invest command. Prices fluctuate dynamically with percentage indicators showing market trends. Investment portfolios are tracked per player with real-time profit/loss calculations and visual market indicators.

Plan:

  • GUI framework with manager and button system

  • Crypto manager with dynamic price fluctuation

  • Investment manager for player holdings

  • Main GUI showing all cryptos with % change

  • Individual crypto GUI for buying/selling

  • Price update task running every minute

Plugin created! CryptoInvest features:

✅ 4 cryptocurrencies: Bitcoin, Ethereum, Dogecoin, Litecoin ✅ Dynamic prices: Update every 60 seconds with configurable volatility ✅ Percentage indicators: Green/red arrows showing market trends ✅ Interactive GUI: Main market view + individual trading screens ✅ Buy/sell options: Multiple amount presets (0.1, 1.0, 10.0) ✅ Portfolio tracking: Shows all holdings and total value ✅ Vault integration: Uses your economy plugin for transactions

Use /invest to open the market GUI. Prices fluctuate based on volatility settings in config.yml. Add more cryptocurrencies by editing the config!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
17 925
src/main/java/com/cryptoinvest/CryptoInvest.java
package com.cryptoinvest;

import com.cryptoinvest.command.InvestCommand;
import com.cryptoinvest.inventory.gui.GUIListener;
import com.cryptoinvest.inventory.gui.GUIManager;
import com.cryptoinvest.manager.CryptoManager;
import com.cryptoinvest.manager.InvestmentManager;
import com.cryptoinvest.task.PriceUpdateTask;
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 CryptoInvest extends JavaPlugin {
    private GUIManager guiManager;
    private CryptoManager cryptoManager;
    private InvestmentManager investmentManager;
    private Economy economy;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        if (!setupEconomy()) {
            getLogger().severe("Vault not found! This plugin requires Vault and an economy plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        
        this.guiManager = new GUIManager();
        this.cryptoManager = new CryptoManager(this);
        this.investmentManager = new InvestmentManager(this);
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getCommand("invest").setExecutor(new InvestCommand(this));
        
        long updateInterval = getConfig().getLong("update-interval", 60) * 20L;
        new PriceUpdateTask(this).runTaskTimer(this, updateInterval, updateInterval);
        
        getLogger().info("CryptoInvest has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("CryptoInvest 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;
    }
}