phoenix.2222

can you make a code for deluxemenu's that will open a INVENTORY GUI with /coinshop,/coin shop,/coins shop so then they can buy things with their coins i want that we can add the items they can buy ourself they are custom items so i want it to be able to get added easily since its not a minecraft: item and i want it to actually take it from their balance were using Brutalcoins so use that logic to take it from their balance

Kodari AI
KodariMar 31 at 11:42 am 15,937 (v2)

I’ll create a coin shop plugin with an inventory GUI that integrates with BrutalCoins and supports custom items.

CoinShopGUI
A configurable coin shop system with inventory GUI interface. Players can purchase items using coins from BrutalCoins economy. Supports both vanilla Minecraft items and custom items from other plugins. Features easy-to-configure shop items with customizable prices, display names, and lore. Includes command aliases for convenient access and automatic balance management.

Now I’ll create the remaining files for the coin shop system:

All files created! The CoinShopGUI plugin is now complete with:

  • Inventory GUI system with clickable buttons

  • BrutalCoins integration using reflection for compatibility

  • Easy configuration - add items in config.yml with custom materials, prices, and commands

  • Two item types: VANILLA (Minecraft items) and COMMAND (custom items via commands)

  • Multiple command aliases: /coinshop, /coin shop, /coins shop

  • Balance checking and automatic coin deduction

To add custom items, just add new entries in config.yml under items section with give-type: COMMAND and specify the command to give the item!

phoenix.2222

make it a normal code in a .yml form so i can add it into the deluxemenu's gui_menus

Kodari AI
KodariMar 31 at 11:46 am 6,781 (v2)

I’ll read the existing plugin files to understand the shop structure, then create a DeluxeMenus YAML configuration.

Here’s your CoinShop as a DeluxeMenus configuration file!

Key features:

  • has_money requirement - Checks if player has enough coins (works with Vault/any economy plugin)

  • takemoney command - Deducts the price from player balance

  • give command - Gives vanilla items directly

  • console command - Executes commands from console (for custom items)

  • sound effects - Success/failure audio feedback

  • inventory space check - Prevents purchases when inventory is full

To use:

  1. Place coinshop.yml in plugins/DeluxeMenus/gui_menus/

  2. Run /dm reload to load the menu

  3. Open with /dm open coinshop or set it to a command in DeluxeMenus config

To add more items, copy any item block and modify:

  • Change the unique key (like diamond_item)

  • Update material, slot, display_name, lore

  • Adjust amount in requirements and [takemoney]

  • Change [give] or [console] command as needed

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
coinshop.yml
Code
15 705
src/main/java/com/coinshop/CoinShopPlugin.java
package com.coinshop;

import com.coinshop.commands.CoinShopCommand;
import com.coinshop.config.ConfigManager;
import com.coinshop.economy.BrutalCoinsHandler;
import com.coinshop.inventory.gui.GUIListener;
import com.coinshop.inventory.gui.GUIManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CoinShopPlugin extends JavaPlugin {
    private GUIManager guiManager;
    private ConfigManager configManager;
    private BrutalCoinsHandler brutalCoinsHandler;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.guiManager = new GUIManager();
        this.brutalCoinsHandler = new BrutalCoinsHandler(this);
        
        if (!brutalCoinsHandler.isEnabled()) {
            getLogger().warning("BrutalCoins not found! Shop will not function properly.");
        }
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getCommand("coinshop").setExecutor(new CoinShopCommand(this));
        
        getLogger().info("CoinShopGUI has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("CoinShopGUI has been disabled!");
    }
}