hama19aura

Create a complete, functional Minecraft Shop plugin for Paper 1.21.11 using Java and Maven.

Plugin name: AdmiralShop

  1. Main Features
  • Create a fully interactive shop GUI.
  • Integrate with Vault for economy transactions.
  • Support EssentialsX Economy or any compatible Vault economy provider.
  • Add four shop categories: End, Nether, Gear, and Food.
  • Use beautiful Unicode text in GUI titles.
  • Support Minecraft legacy color codes (&a, &c, &l) and modern hex colors (#RRGGBB).
  • Allow players to purchase items through the GUI.
  • Add quantity selection before purchasing.
  • Display item prices in GUI lore.
  • Check player balances before every transaction.
  • Check inventory space before giving purchased items.
  • Deduct money correctly and give items only after successful transactions.
  • Play sounds for successful and unsuccessful purchases.
  • Prevent item duplication and economy exploits.
  • Support configurable messages, item prices, sounds, and GUI titles.
  1. GUI Titles

Configure these titles in config.yml:

gui: main-shop-title: "ѕʜᴏᴘ" end-shop-title: "ѕʜᴏᴘ - ᴇɴᴅ" nether-shop-title: "ѕʜᴏᴘ - ɴᴇᴛʜᴇʀ" gear-shop-title: "ѕʜᴏᴘ - ɢᴇᴀʀ" food-shop-title: "ѕʜᴏᴘ - ꜰᴏᴏᴅ"

  1. Configurable Messages

messages: not-enough-money: "&cYou don't have enough money." inventory-full: "&cYour inventory is full." purchase-success: "&aPurchase successful!" purchase-failed: "&cPurchase failed." shop-opened: "&aShop opened successfully." invalid-amount: "&cInvalid purchase amount." reload-success: "&aShop configuration reloaded." no-permission: "&cYou don't have permission."

  1. Sound Configuration

sounds: purchase-successful: "ENTITY_EXPERIENCE_ORB_PICKUP" purchase-successful-volume: 0.5 purchase-unsuccessful: "ENTITY_VILLAGER_NO" click: "UI_BUTTON_CLICK"

  1. Shop Categories and Items

End Shop

  • Ender Chest
  • Ender Pearls
  • End Stone
  • Dragon Breath
  • Chorus Fruit
  • Shulker Shells

Nether Shop

  • Blaze Rods
  • Nether Wart
  • Glowstone Dust
  • Magma Cream
  • Ghast Tears
  • Nether Quartz

Gear Shop

  • Obsidian
  • End Crystals
  • Respawn Anchors
  • Totems of Undying
  • Golden Apples
  • Arrows

Food Shop

  • Potatoes
  • Sweet Berries
  • Carrots
  • Apples
  • Cooked Chicken
  • Steak
  • Golden Carrots
  1. Sample Prices

prices: enderchest: 2500 blazerod: 150 totemofundying: 1250 steak: 35

Add reasonable default prices for all other items. Make all prices configurable in config.yml.

  1. Commands

/shop

  • Opens the main shop GUI.

/shop reload

  • Reloads the plugin configuration.
  • Requires admiralshop.admin permission.

/shop help

  • Shows available commands.

Permissions:

  • admiralshop.use
  • admiralshop.admin
  1. GUI Design
  • Main menu displays four category buttons.
  • Each category opens its own inventory GUI.
  • Each item displays its name, price, and purchase instructions in its lore.
  • Add a Back button to return to the previous menu.
  • Add a Close button to close the GUI.
  • Use decorative glass panes where appropriate.
  • Use a consistent, professional design.
  • Prevent players from taking decorative items or shop icons from the GUI.
  • Support configurable GUI sizes and item slots.
  1. Quantity Selection

When a player clicks an item:

  • Open a quantity selection GUI.
  • Provide buttons for purchasing 1, 8, 16, 32, or 64 items.
  • Include a custom amount option if practical.
  • Display the total cost before confirming.
  • Provide Confirm, Cancel, and Back buttons.
  • Validate the player's balance and inventory space.
  • Never charge money if the purchase fails.
  1. Economy Integration
  • Use Vault's Economy API.
  • Check that Vault and an economy provider are installed.
  • Disable the plugin gracefully if the required dependencies are missing.
  • Never modify player balances using unsupported methods.
  • Handle transaction failures safely.
  • Prevent negative prices and invalid quantities.
  • Do not allow players to manipulate GUI items to obtain free items.
  1. Technical Requirements
  • Use Java compatible with Paper 1.21.11.
  • Use Maven for building.
  • Provide a complete pom.xml.
  • Provide plugin.yml with the correct main class, commands, permissions, API version, and dependencies.
  • Provide config.yml with all categories, items, prices, messages, sounds, and GUI titles.
  • Organize the Java code into clean, maintainable classes.
  • Use Bukkit/Paper APIs correctly.
  • Ensure GUI click and drag events are handled safely.
  • Use InventoryHolder or another reliable method to identify plugin GUIs.
  • Validate all configuration values.
  • Avoid deprecated APIs where possible.
  • Make sure all inventory operations run on the appropriate server thread.
  1. Expected Output

Generate the complete project, including:

  1. Project directory structure.
  2. All Java source files.
  3. pom.xml.
  4. plugin.yml.
  5. config.yml.
  6. README.md with installation and usage instructions.
  7. Build instructions for generating the final JAR file.
  8. Clear instructions for installing the plugin on a Paper server hosted by MCServerHost.

Do not provide pseudocode or incomplete examples. Generate the actual, complete, compilable source code for every required file.

Before finishing, check for compilation errors, missing dependencies, incorrect Material names, invalid YAML syntax, and compatibility with Paper 1.21.11.

The final goal is a working Minecraft Shop plugin that I can compile into a JAR file and install directly on my server.

Kodari AI
KodariOct 17 at 4:24 pm 1
AdmiralShop
AdmiralShop is a comprehensive Minecraft shop plugin for Paper 1.21.11 with Vault economy integration. It features four shop categories (End, Nether, Gear, Food) with configurable items and prices, an interactive GUI system with quantity selection, and full configuration support. Players can browse items, select purchase quantities, and buy items with automatic balance and inventory space validation. The plugin includes configurable messages, sounds, and GUI titles with Unicode support, plus admin commands for reloading configuration.
  1. Create the Maven project and Paper/Vault metadata.

  2. Implement validated configuration, shop menus, quantity confirmation, and safe Vault transactions.

  3. Add default configuration and installation/usage documentation.

Created the AdmiralShop Maven project with Paper 1.21.11 metadata, Vault economy integration, configurable shop categories and prices, quantity selection, and protected GUI transactions. The README includes setup and MCServerHost installation instructions.

To get the JAR, click Compile in Kodari (on mobile: ⋮ → Compile Project), then download the successful build. Install AdmiralShop.jar alongside Vault and a Vault-compatible economy provider.

Kodari can make mistakes. Review important code before using.
Files
src
manifest.kod
pom.xml
README.md
Code
10 996
src/main/java/com/admiralshop/AdmiralShopPlugin.java
package com.admiralshop;

import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

public final class AdmiralShopPlugin extends JavaPlugin {
    private ShopManager shopManager;

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

        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            getLogger().severe("Vault is required. Install Vault and an economy provider to use AdmiralShop.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        RegisteredServiceProvider<Economy> registration = getServer().getServicesManager().getRegistration(Economy.class);
        if (registration == null || registration.getProvider() == null) {
            getLogger().severe("No Vault economy provider was found. Install EssentialsX Economy or another compatible provider.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        shopManager = new ShopManager(this, registration.getProvider());
        getServer().getPluginManager().registerEvents(new ShopListener(shopManager), this);
        getCommand("shop").setExecutor(new ShopCommand(this, shopManager));
    }
}