3du4rd_p

create a highly customizable /shop plugin in which the main currency are the Souls. Make so i can change the categories and the items that the categories sell and for how many souls they cost. also add a /soul:shop command and a operator players only command which is: /soul:give (player) (amount) also make the shop's categories, items and item cost customizable with a command for operator players only which is /soul:customize which opens a INVENTORY GUI with in which you can personalize the categories, the items and their price but also add a config.yml file in which i can customize the categories, the items and their price

Kodari AI
KodariMar 29 at 7:07 pm 28,646 (v2)
SoulShop
A fully customizable shop plugin built around a Souls currency. Players use /soul:shop to browse categories and purchase items. Admins can use /soul:give to grant souls, and /soul:customize to open an interactive inventory GUI for managing categories, items, and prices in real time. All shop data is persisted in config.yml with full support for custom categories, item materials, display names, prices, and amounts.

I’ll plan this fully before writing:

  • GUI framework (Handler, Button, InventoryGUI, GUIManager, GUIListener) from the doc

  • ShopManager reads/writes categories+items from config.yml; SoulManager persists per-player souls to souls.yml

  • Four GUI impls: ShopMainGUI, ShopCategoryGUI, CustomizeMainGUI, CustomizeCategoryGUI

  • ChatInputListener handles chat-based prompts for price edits, renaming, icon changes, and adding items

  • Plugin name Soul so /soul:shop, /soul:give, /soul:customize resolve via Bukkit’s automatic plugin prefix

Here’s a summary of everything built:


Plugin Structure:

Command
Who
What
/soul:shop
(or
/shop
)
Anyone
Browse categories & buy items
/soul:give <player> <amount>
OP only
Give souls to a player
/soul:customize
OP only
Open the customize GUI

GUI Overview:

  • ShopMainGUI — Displays all configured categories in their slot positions with a live soul balance display. Click a category to enter it.

  • ShopCategoryGUI — Shows all items in a category with price/amount in lore. Left-click to purchase; deducts souls and gives the item (drops overflow on the ground).

  • CustomizeMainGUI — Left-click a category to edit its items, Middle-click to change its slot, Right-click to delete it. “Add Category” button (slot 45) walks through a multi-step chat prompt.

  • CustomizeCategoryGUI — Left-click an item to change price, Middle-click to change amount, Shift+Left to rename, Right-click to remove. “Add Item” (slot 53) accepts MATERIAL PRICE [AMOUNT] [DISPLAY_NAME] via chat.

Data persistence:

  • config.yml — all categories, items, prices (auto-saved after every customize action)

  • souls.yml — per-player soul balances (saved on quit and on plugin disable)

3du4rd_p

also make that if i put in a scoreboard plugin &player_soul% it shows how many souls the player has

Kodari AI
KodariMar 29 at 7:13 pm 5,598 (v2)

Let me read the relevant files first.

  • Add PlaceholderAPI compileOnly dependency to build.gradle

  • Create a SoulPlaceholder expansion class that exposes %player_soul%

  • Register it in SoulShop#onEnable only if PlaceholderAPI is present

Done — %player_soul% is now a registered PlaceholderAPI placeholder that returns the soul count for any player, and it only activates when PlaceholderAPI is installed.

3du4rd_p

also add soul vouchers that operators can get with the command: /soul:voucher (player) (voucher's souls)

Kodari AI
KodariMar 29 at 7:16 pm 8,800 (v2)

Let me read the existing files first.

  • Add voucher command to plugin.yml and SoulCommandExecutor (accessed via /soul:voucher)

  • Add createVoucher(long souls) to ItemUtil using PersistentDataContainer to store souls

  • Create VoucherListener that handles right-click to redeem vouchers and consume the item

Done. /soul:voucher <player> <amount> (op-only) gives the target player a Soul Voucher item (Nether Star) with the soul amount stored via PersistentDataContainer. Right-clicking the voucher redeems it — adding the souls and consuming the item. The voucher command is registered in plugin.yml under the plugin namespace so it’s accessible as /soul:voucher.

3du4rd_p

make it a .jar file

Kodari AI
KodariMar 29 at 7:42 pm 4,938 (v2)

Let me read the project files first.

The build.gradle already has a jar block but is missing duplicatesStrategy, which causes build failures when merging dependencies. I’ll fix that.

Run ./gradlew jar (Linux/Mac) or gradlew.bat jar (Windows) and the output .jar will be at build/libs/SoulShop-1.0.0.jar. Drop it into your server’s plugins/ folder.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
22 1,465
src/main/java/com/soulshop/SoulShop.java
package com.soulshop;

import com.soulshop.command.SoulCommandExecutor;
import com.soulshop.inventory.gui.GUIListener;
import com.soulshop.inventory.gui.GUIManager;
import com.soulshop.listener.ChatInputListener;
import com.soulshop.listener.VoucherListener;
import com.soulshop.util.ItemUtil;
import com.soulshop.manager.ShopManager;
import com.soulshop.manager.SoulManager;
import com.soulshop.placeholder.SoulPlaceholder;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SoulShop extends JavaPlugin {

    private GUIManager guiManager;
    private SoulManager soulManager;
    private ShopManager shopManager;
    private ChatInputListener chatInputListener;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.guiManager = new GUIManager();
        this.soulManager = new SoulManager(this);
        this.shopManager = new ShopManager(this);
        this.chatInputListener = new ChatInputListener(this);

        soulManager.load();
        shopManager.loadCategories();

        ItemUtil.initVoucherKey(this);

        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getServer().getPluginManager().registerEvents(chatInputListener, this);
        getServer().getPluginManager().registerEvents(soulManager, this);
        getServer().getPluginManager().registerEvents(new VoucherListener(this), this);

        if (getServer().getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new SoulPlaceholder(this).register();
        }

        SoulCommandExecutor executor = new SoulCommandExecutor(this);
        getCommand("shop").setExecutor(executor);
        getCommand("give").setExecutor(executor);
        getCommand("customize").setExecutor(executor);
        getCommand("voucher").setExecutor(executor);
    }

    @Override
    public void onDisable() {
        soulManager.saveAll();
    }
}