ליאן ליטבאק

create me mincraft shopgui like dount

Kodari AI
KodariSep 18 at 12:49 pm 2
DonutShopGUI
A Minecraft plugin that creates a donut shop GUI system using the inventory framework. Players can open a virtual donut shop through a command, browse various donut items displayed in a chest interface, and purchase them with in-game currency. The shop features multiple donut varieties with custom names, descriptions, and prices, all managed through an interactive button-based inventory system. Each donut purchase deducts funds from the player's balance and delivers the item to their inventory. The plugin includes a main shop menu with categorized donut selections, purchase confirmation mechanics, and visual feedback through item lore showing prices and flavor descriptions. The GUI framework handles click events, inventory management, and automatic cleanup when players close the shop interface.
  1. Build a configurable Donut-style shop with /shop, category navigation, pagination, and buy/sell actions.

  2. Add Vault economy integration with a safe disabled state when Vault or an economy provider is unavailable.

  3. Create the Paper plugin structure, default shop configuration, GUI framework, commands, listeners, and build metadata.

Created a configurable Donut-style Minecraft shop plugin with:

  • /shop and /shop reload

  • Category-based GUI navigation

  • Paginated item menus

  • Buy and sell menus for quantities of 1, 16, and 64

  • Vault economy integration

  • Inventory space checks

  • Item ownership checks when selling

  • Configurable categories, items, prices, names, lore, titles, and messages

  • Default categories for blocks, ores, farming, and mob drops

  • Graceful operation when Vault or an economy provider is unavailable

  • /shopgui alias

  • Admin permission: donutshop.admin

Main package: com.kodari.donutshop

ליאן ליטבאק

add cmd do edit the shop or add ting

Kodari AI
KodariSep 18 at 12:57 pm 1
  1. Add admin shop-edit commands for creating categories and adding/updating/removing shop items.

  2. Persist changes into config.yml, reload the in-memory shop, and document the command usage/permissions.

Added admin shop editing commands:

  • /shop edit addcategory <id> <icon> <name>

  • /shop edit additem <category> <id> <material> <buy> <sell> [name]

  • /shop edit removeitem <category> <id>

  • /shop edit setprice <category> <id> <buy> <sell>

  • /shop edit setname <category> <id> <name>

Changes are saved directly to config.yml and the shop reloads automatically.

Examples:

Plain Text
/shop edit addcategory food CHEST &aFood Shop
/shop edit additem food apple APPLE 10 3 &cRed Apple
/shop edit setprice food apple 15 5
/shop edit setname food apple &6Golden Apple
/shop edit removeitem food apple

Use -1 for a disabled buy or sell price. All commands require:

Plain Text
donutshop.admin

Also added tab completion and updated /shop usage information.

ליאן ליטבאק

do in shop edit is hell work on what is in hand

Kodari AI
KodariSep 18 at 1:20 pm 1
  1. Change /shop edit additem to read the material from the player’s held item.

  2. Add a held-item command to update an existing shop item’s material without typing the material name.

  3. Update usage and tab completion while keeping console-safe validation.

Updated shop editing to use the item in the player’s main hand.

Commands:

Plain Text
/shop edit additem <category> <id> <buy> <sell> [name]

Example:

Plain Text
Hold a diamond in your hand
/shop edit additem ores diamond 250 100 &bDiamond

Also added:

Plain Text
/shop edit setitem <category> <id>

Example:

Plain Text
Hold an emerald in your hand
/shop edit setitem ores diamond

This changes the existing shop item’s material to the item you are holding.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
14 1,059
src/main/java/com/kodari/donutshop/DonutShop.java
package com.kodari.donutshop;

import com.kodari.donutshop.command.ShopCommand;
import com.kodari.donutshop.gui.ShopGui;
import com.kodari.donutshop.listener.ShopListener;
import com.kodari.donutshop.shop.ShopService;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

public class DonutShop extends JavaPlugin {
    private ShopService shopService;
    private ShopGui shopGui;
    private Economy economy;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        setupEconomy();
        shopService = new ShopService(this);
        shopService.reload();
        shopGui = new ShopGui(this, shopService, economy);

        ShopCommand shopCommand = new ShopCommand(this, shopGui);
        getCommand("shop").setExecutor(shopCommand);
        getCommand("shop").setTabCompleter(shopCommand);
        getServer().getPluginManager().registerEvents(new ShopListener(shopGui), this);

        if (economy == null) {
            getLogger().warning("Vault or an economy provider was not found. Shop transactions are disabled.");
        }
        getLogger().info("Loaded " + shopService.getCategories().size() + " shop categories.");
    }

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

    public void reloadShop() {
        reloadConfig();
        shopService.reload();
    }

    public Economy getEconomy() {
        return economy;
    }
}