pvz.3pic

make a simple 1.12.2 plugin, make sure EVERYTHING WORKS:

Using the vault plugin for money, or wtv. 5 categories per page, 5 items per page Make a /shop with categories: [GEAR] Ender pearls - $100 Golden apple - $250 Totem of Undying - $1700 End crystal - $250 Obsidian - $150 when you click on an item it refreshes the INVENTORY GUI and goes to the buy area where on the left theres a back button, in the middle is ur item, and you can click +1 +10 +64 - hwoever, if you don't have enough (price * how much) it wont buy or take money, there should also be a buy button.

Kodari AI
KodariApr 17 at 4:48 pm 12,049 (v2)

I’ll create a complete shop plugin with GUI-based category browsing and item purchasing using Vault economy.

SimpleShopGUI
A GUI-based shop plugin featuring category browsing and item purchasing with quantity controls. Includes the Gear category with ender pearls, golden apples, totems of undying, end crystals, and obsidian. Players can select items and purchase them using +1, +10, +64 quantity buttons with full Vault economy integration and balance validation.

All files created! The plugin features:

Main Features:

  • /shop command opens category browser

  • GEAR category with all 5 requested items (ender pearls $100, golden apples $250, totems $1700, end crystals $250, obsidian $150)

  • Purchase GUI with back button, item display, +1/+10/+64 quantity controls, and buy button

  • Full Vault economy integration with balance validation

  • Buy button changes color (emerald/redstone) based on affordability

  • Automatically handles stack splitting for large quantities

Technical Implementation:

  • Uses XSeries for 1.12.2 compatibility

  • Event-driven GUI framework with lazy initialization

  • Proper inventory space checking before purchase

  • Transaction validation (no money taken if insufficient funds)

  • Memory-efficient auto-cleanup of closed inventories

The plugin is ready to compile and run on 1.12.2 servers with Vault installed!

pvz.3pic

fix the INVENTORY GUI, mkae it better the gear category should be in the middle all items in the category should be lined up in the middle, make a method to -1 ferom the item you're purchasing. clean the INVENTORY GUI aswell. add one more category with items aswell. "ORES" coal lapis gold diamond emerald iron redstone

pvz.3pic

fix the INVENTORY INVENTORY GUI, mkae it better the gear category should be in the middle all items in the category should be lined up in the middle, make a method to -1 ferom the item you're purchasing. clean the INVENTORY INVENTORY GUI aswell. add one more category with items aswell. "ORES" coal lapis gold diamond emerald iron redstone

pvz.3pic

all items in a category should be lined in the middle (left to right), add cobwebs to gear for the 2nd page, add a way to go to the first, and theb abutton to go home for 1st page, make all categories like the gear layout

pvz.3pic

all items in a category and home should be lined in the middle - left to right, add a -1 button for items

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
15 769
src/main/java/com/example/simpleshop/SimpleShopGUI.java
package com.example.simpleshop;

import com.example.simpleshop.command.ShopCommand;
import com.example.simpleshop.economy.VaultEconomy;
import com.example.simpleshop.inventory.gui.GUIListener;
import com.example.simpleshop.inventory.gui.GUIManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SimpleShopGUI extends JavaPlugin {
    private GUIManager guiManager;
    private VaultEconomy vaultEconomy;
    
    @Override
    public void onEnable() {
        this.vaultEconomy = new VaultEconomy();
        if (!this.vaultEconomy.setupEconomy(this)) {
            this.getLogger().severe("Vault economy not found! Disabling plugin.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        
        this.guiManager = new GUIManager();
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
        
        this.getCommand("shop").setExecutor(new ShopCommand(this));
        
        this.getLogger().info("SimpleShopGUI has been enabled!");
    }
    
    @Override
    public void onDisable() {
        this.getLogger().info("SimpleShopGUI has been disabled!");
    }
}