Gap

GAPWILDFORGE — COMPLETE PLUGIN DEVELOPMENT PROMPT

Create a complete, production-ready Minecraft plugin called GapWildForge for Paper 1.21.11.

The plugin is a configurable buying GUI inspired by the "/wildforge" style of SMP servers.

The main player command is:

/wildforge

When a player executes "/wildforge", the GapWildForge buying GUI opens.

The GUI must contain ONLY the configured armor and tool items.

There must be NO Sell Wand, "/sw", "/sell", "/sellgui", shulker selling, potion system, buff system, crate system, rank system, or unrelated features.

---

  1. PLUGIN IDENTITY

Plugin name:

GapWildForge

Developer:

GapPlayz

Main branding:

&c&lGapWildForge

Default prefix:

&c&lGapWildForge &8»

Every plugin-owned message must use GapWildForge branding.

Do not leave old plugin branding such as:

WildGear WildForge

inside plugin messages, GUI messages, console messages, permissions, or configuration comments.

The command "/wildforge" is intentionally retained and must remain the primary player command.

---

  1. SERVER COMPATIBILITY

Target:

Minecraft 1.21.11 Paper 1.21.11 Java 21

Use modern Paper/Bukkit APIs.

Do not use outdated APIs unless absolutely necessary.

The project must compile into a working:

GapWildForge.jar

---

  1. MAIN COMMAND

The main player command is:

/wildforge

Executing it opens the shop GUI.

Example:

Player ↓ /wildforge ↓ GapWildForge GUI opens

Do not rename the main command to "/gapforge".

Optional aliases may be provided:

/gwf /gapwildforge

but "/wildforge" MUST always work.

---

  1. ADMIN COMMAND

Create:

/gapwildforge reload /gapwildforge info

Permissions:

gapwildforge.use gapwildforge.admin gapwildforge.*

Default permissions:

gapwildforge.use = true gapwildforge.admin = op gapwildforge.* = op

Normal players only need:

gapwildforge.use

---

  1. CORE SHOP SYSTEM

The plugin is a buy-only shop.

The default shop contains:

ARMOR

Diamond Helmet Diamond Chestplate Diamond Leggings Diamond Boots

TOOLS / WEAPON

Diamond Sword Diamond Pickaxe Diamond Axe Diamond Shovel Diamond Hoe

These are the default items only.

The owner must be able to change, remove, disable, or add items through configuration.

---

  1. FULL CONFIGURATION

This is extremely important.

The plugin must be fully configuration-driven.

The server owner must NOT need to edit Java source code to customize the shop.

The owner must be able to change:

  • Item material
  • Item slot
  • Item price
  • Item name
  • Item lore
  • Enchantments
  • Enchantment levels
  • Item flags
  • Custom Model Data
  • Unbreakable state
  • GUI title
  • GUI size
  • GUI rows
  • Filler items
  • Filler slots
  • Confirmation GUI
  • Confirmation button slots
  • Cancel button slots
  • Sounds
  • Messages
  • Prefix
  • Colors
  • Startup banner
  • Command aliases
  • Item enabled/disabled state

Nothing important should be hardcoded.

---

  1. ITEM CONFIGURATION

Use a configuration structure like:

items:

helmet: enabled: true slot: 20 material: DIAMOND_HELMET price: 10000

name: "&c&lWild Helmet"

lore: - "&7Protection III" - "&7Unbreaking II" - "" - "&8Price: &c$10,000" - "" - "&eClick to purchase"

enchantments: protection: 3 unbreaking: 2

item-flags: - HIDE_ATTRIBUTES

unbreakable: false

custom-model-data: 0

purchase-sound: enabled: true sound: ENTITY_PLAYER_LEVELUP volume: 1.0 pitch: 1.0

Create the same structure for:

items: helmet: chestplate: leggings: boots: sword: pickaxe: axe: shovel: hoe:

---

  1. CHANGE ITEM LOCATION

The owner must be able to move an item simply by changing:

slot: 20

to:

slot: 40

The item must then appear in slot 40 after:

/gapwildforge reload

Do NOT hardcode item positions in Java.

---

  1. CHANGE ENCHANTMENTS

The owner must be able to change enchantments completely.

Example:

enchantments: protection: 3 unbreaking: 2

Changing it to:

enchantments: protection: 5 unbreaking: 3

must produce:

Protection V Unbreaking III

on the actual Minecraft item.

Support multiple enchantments:

enchantments: protection: 5 unbreaking: 3 mending: 1

Do not fake enchantments using lore.

Use actual Minecraft enchantments.

---

  1. CHANGE MATERIAL

The owner must be able to change:

material: DIAMOND_HELMET

to any valid supported Bukkit/Paper Material.

For example:

material: NETHERITE_HELMET

must make the shop item a Netherite Helmet.

Validate materials safely.

If a material is invalid, show a console warning and skip the item instead of crashing.

---

  1. CHANGE PRICE

Every item's price must be independently configurable.

Example:

price: 10000

Changing it to:

price: 25000

must make the item cost $25,000.

Do not hardcode prices in Java.

Reject:

  • Negative prices
  • NaN
  • Infinity

---

  1. CHANGE NAME

Example:

name: "&c&lWild Helmet"

The owner can change it to:

name: "&6&lInferno Helmet"

The GUI must immediately use the configured name after reload.

---

  1. CHANGE LORE

Lore must be completely configurable.

Example:

lore: - "&7Powerful SMP armor." - "" - "&cProtection V" - "&cUnbreaking III" - "" - "&8Price: &6$25,000" - "" - "&eClick to purchase"

Do not hardcode lore.

---

  1. ITEM FLAGS

Allow:

item-flags: - HIDE_ATTRIBUTES - HIDE_ENCHANTS

Validate flags safely.

---

  1. CUSTOM MODEL DATA

Support:

custom-model-data: 12345

If:

custom-model-data: 0

do not apply custom model data.

---

  1. UNBREAKABLE

Support:

unbreakable: false

or:

unbreakable: true

Use actual Minecraft item metadata.

---

  1. DEFAULT ARMOR

Default armor:

Helmet

Material: DIAMOND_HELMET Price: $10,000 Protection III Unbreaking II

Chestplate

Material: DIAMOND_CHESTPLATE Price: $10,000 Protection III Unbreaking II

Leggings

Material: DIAMOND_LEGGINGS Price: $10,000 Protection III Unbreaking II

Boots

Material: DIAMOND_BOOTS Price: $10,000 Protection III Unbreaking II

---

  1. DEFAULT TOOLS

Include:

Diamond Sword Diamond Pickaxe Diamond Axe Diamond Shovel Diamond Hoe

Their prices and enchantments must be configurable.

Example defaults:

sword: material: DIAMOND_SWORD price: 10000 enchantments: sharpness: 3 unbreaking: 2

pickaxe: material: DIAMOND_PICKAXE price: 10000 enchantments: efficiency: 3 unbreaking: 2

axe: material: DIAMOND_AXE price: 10000 enchantments: efficiency: 3 unbreaking: 2

shovel: material: DIAMOND_SHOVEL price: 10000 enchantments: efficiency: 3 unbreaking: 2

hoe: material: DIAMOND_HOE price: 10000 enchantments: efficiency: 3 unbreaking: 2

---

  1. ENABLE / DISABLE ITEMS

Each item must have:

enabled: true

If changed to:

enabled: false

that item must not appear in the GUI.

This allows the owner to remove individual items without deleting their configuration.

---

  1. ADD CUSTOM ITEMS

The configuration system should allow the owner to add additional shop entries without changing Java.

Example:

items:

special_pickaxe: enabled: true slot: 41 material: DIAMOND_PICKAXE price: 50000 name: "&b&lSpecial Pickaxe"

lore: - "&7A special pickaxe."

enchantments: efficiency: 5 unbreaking: 3 fortune: 3

The plugin should dynamically load configured items.

---

  1. GUI CONFIGURATION

Everything about the GUI must be configurable.

Example:

gui:

title: "&8&lWildForge"

rows: 6

filler: enabled: true material: BLACK_STAINED_GLASS_PANE name: " " lore: []

close-on-purchase: false

---

  1. GUI SLOTS

Item slots must come entirely from configuration.

Example:

items:

helmet: slot: 20

chestplate: slot: 21

leggings: slot: 22

boots: slot: 23

sword: slot: 29

pickaxe: slot: 30

axe: slot: 31

shovel: slot: 32

hoe: slot: 33

The Java code must NOT contain fixed positions such as:

helmet = 20 chestplate = 21

---

  1. GUI FILLER

Allow the owner to configure filler material:

filler: enabled: true material: BLACK_STAINED_GLASS_PANE name: " "

Allow custom filler slots:

filler-slots: - 0 - 1 - 2 - 3 - 4

Also support:

filler-slots: ALL

if practical.

---

  1. PURCHASE SYSTEM

When the player clicks a configured item:

  1. Detect the clicked shop item.
  2. Read its configured price.
  3. Validate the price.
  4. Check Vault.
  5. Check player's balance.
  6. Check inventory space.
  7. Withdraw money.
  8. Create the configured ItemStack.
  9. Give the item.
  10. Send success message.
  11. Play purchase sound.

---

  1. TRANSACTION SAFETY

Never:

  • Take money and fail to give the item.
  • Give the item without taking money.
  • Process one click twice.
  • Allow a double-click to produce duplicate purchases.

Use a transaction guard for each player interaction.

---

  1. INVENTORY SPACE

Before charging the player, verify the item can be safely added.

If there is no space:

&c&lGapWildForge &8» &cYou don't have enough inventory space.

Do not withdraw money.

If something unexpectedly fails after withdrawal, safely handle the item and economy transaction.

Never silently delete a purchased item.

---

  1. VAULT

Use Vault for economy.

The plugin must detect Vault during startup.

Example:

[GapWildForge] Vault: Hooked

If Vault is missing:

[GapWildForge] Vault: Not Found

The plugin should remain loaded, but purchases should be disabled until an economy provider is available.

Do not crash the server.

---

  1. PURCHASE CONFIRMATION

Make confirmation configurable:

purchase: confirmation: true

When enabled, clicking an item opens a confirmation GUI.

Example:

CONFIRM PURCHASE

Diamond Helmet

Price: $10,000

[ CONFIRM ] [ CANCEL ]

Both buttons must be configurable.

Example:

confirmation-gui:

title: "&8Confirm Purchase"

confirm: slot: 11 material: LIME_WOOL name: "&a&lCONFIRM"

cancel: slot: 15 material: RED_WOOL name: "&c&lCANCEL"

---

  1. SOUNDS

Make sounds configurable.

Example:

sounds:

open: enabled: true sound: BLOCK_CHEST_OPEN volume: 1.0 pitch: 1.0

purchase: enabled: true sound: ENTITY_PLAYER_LEVELUP volume: 1.0 pitch: 1.0

failure: enabled: true sound: ENTITY_VILLAGER_NO volume: 1.0 pitch: 1.0

---

  1. MESSAGES

Create:

messages.yml

Example:

prefix: "&c&lGapWildForge &8»"

purchase-success: "%prefix% &aPurchased &f%item% &afor &c$%price%" not-enough-money: "%prefix% &cYou don't have enough money." inventory-full: "%prefix% &cYou don't have enough inventory space." purchase-error: "%prefix% &cThe purchase could not be completed." no-permission: "%prefix% &cYou don't have permission." economy-missing: "%prefix% &cThe economy system is unavailable." reload: "%prefix% &aConfiguration reloaded." unknown-item: "%prefix% &cThis item is unavailable."

Support:

  • "&" colors
  • Hex colors where supported
  • "%player%"
  • "%item%"
  • "%price%"

---

  1. PLACEHOLDERAPI

PlaceholderAPI should be optional.

If installed, support useful placeholders such as:

%player_name% %player_displayname% %gapwildforge_prefix%

Do not make PlaceholderAPI mandatory.

---

  1. STARTUP BANNER

When the plugin starts, display a large professional console banner.

The large text MUST prominently say:

GAP

Example:

==============================================================

██████╗ █████╗ ██████╗ ██╔════╝ ██╔══██╗██╔══██╗ ██║ ███╗███████║██████╔╝ ██║ ██║██╔══██║██╔═══╝ ╚██████╔╝██║ ██║██║ ╚═════╝ ╚═╝ ╚═╝╚═╝

GapWildForge Developed by GapPlayz

==============================================================

[GapWildForge] Starting GapWildForge... [GapWildForge] Paper 1.21.11 detected. [GapWildForge] Vault: Hooked [GapWildForge] Items: Loaded [GapWildForge] GUI: Loaded [GapWildForge] GapWildForge enabled successfully!

==============================================================

The banner should be configurable:

branding: startup-banner: true

---

  1. BRANDING CONFIGURATION

Allow:

branding:

name: "&c&lGapWildForge"

prefix: "&c&lGapWildForge &8»"

developer: "GapPlayz"

startup-banner: true

All messages should use the configured prefix.

---

  1. RELOAD SYSTEM

Implement:

/gapwildforge reload

Reload:

  • config.yml
  • messages.yml
  • GUI
  • items
  • prices
  • enchantments
  • sounds
  • branding

Do not require a server restart.

When reload succeeds:

&c&lGapWildForge &8» &aConfiguration reloaded successfully.

---

  1. CONFIG VALIDATION

On startup/reload validate

Kodari AI
KodariSep 18 at 8:31 am 3
GapWildForge
A fully configurable Paper 1.21.11 Minecraft plugin providing a buy-only shop GUI accessible via /wildforge. Features dynamic item configuration for armor and tools with customizable materials, slots, prices, enchantments, names, lore, item flags, custom model data, and unbreakable states. Includes configurable GUI title, rows, filler items, confirmation screens, sounds, and messages. Integrates Vault economy with transaction safety guards, inventory space verification, and optional PlaceholderAPI support. Admin commands /gapwildforge reload and info with permission-based access. Features a branded startup banner and complete reload functionality without server restarts.
  1. Create the Gradle project, plugin metadata, and fully configurable default YAML files.

  2. Implement configuration parsing, validation, branding/messages, materials, enchantments, flags, sounds, and optional integrations.

  3. Implement the buy-only shop GUI, confirmation GUI, transaction guard, inventory checks, and Vault-backed purchases.

  4. Register /wildforge, /gwf, /gapwildforge, reload/info commands, listeners, and startup diagnostics.

The initial implementation needs one wiring correction before it is usable: menu clicks must route through the plugin instance so configured purchases and confirmation actions execute rather than merely closing the inventory.

Created the GapWildForge project with:

  • Paper 1.21.11 / Java 21 Gradle setup

  • /wildforge, /gwf, and /gapwildforge

  • Admin reload/info commands

  • Fully configurable shop items, slots, materials, prices, lore, enchantments, flags, model data, and unbreakable state

  • Buy-only GUI with configurable filler and confirmation menu

  • Vault economy integration with safe balance, inventory, withdrawal, refund, and transaction handling

  • Optional PlaceholderAPI support

  • Configurable branding, messages, sounds, startup banner, and GUI settings

  • Default armor and tool configuration matching the requested setup

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
15 857
src/main/java/com/gapplayz/gapwildforge/GapWildForge.java
package com.gapplayz.gapwildforge;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

public final class GapWildForge extends JavaPlugin {
    private ConfigManager config;
    private EconomyHook economy;
    private ShopListener menus;
    private final Set<UUID> transactions = ConcurrentHashMap.newKeySet();

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("messages.yml", false);
        config = new ConfigManager(this);
        config.load();

        economy = new EconomyHook();
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            getLogger().info("Vault: Not Found");
        } else {
            economy.setup(this);
        }

        menus = new ShopListener(this);
        getServer().getPluginManager().registerEvents(menus, this);
        getCommand("wildforge").setExecutor(new Commands(this));
        getCommand("gapwildforge").setExecutor(new Commands(this));

        banner();
        getLogger().info("Items: Loaded");
        getLogger().info("GUI: Loaded");
        getLogger().info("GapWildForge enabled successfully!");
    }

    public ConfigManager config() {
        return config;
    }

    public EconomyHook economy() {
        return economy;
    }

    public void openShop(Player player) {
        menus.openShop(player);
    }

    public void purchase(Player player, ShopItem requested) {
        if (!transactions.add(player.getUniqueId())) return;
        Bukkit.getScheduler().runTaskLater(this, () -> transactions.remove(player.getUniqueId()), 2L);

        ShopItem item = config.item(requested.key());
        if (item == null || !item.enabled()) {
            Text.send(this, player, "unknown-item", player, Collections.emptyMap());
            config.failureSound().play(player);
            return;
        }
        if (!economy.available()) {
            Text.send(this, player, "economy-missing", player, Collections.emptyMap());
            config.failureSound().play(player);
            return;
        }

        ItemStack product = ItemFactory.shopItem(item);
        if (!canFit(player, product)) {
            Text.send(this, player, "inventory-full", player, Collections.emptyMap());
            config.failureSound().play(player);
            return;
        }
        if (!economy.has(player, item.price())) {
            Text.send(this, player, "not-enough-money", player, Collections.emptyMap());
            config.failureSound().play(player);
            return;
        }
        if (!economy.withdraw(player, item.price())) {
            Text.send(this, player, "purchase-error", player, Collections.emptyMap());
            config.failureSound().play(player);
            return;
        }

        Map<Integer, ItemStack> leftovers = player.getInventory().addItem(product);
        if (!leftovers.isEmpty()) {
            boolean refunded = economy.deposit(player, item.price());
            leftovers.values().forEach(leftover ->
                    player.getWorld().dropItemNaturally(player.getLocation(), leftover));
            Text.send(this, player, refunded ? "purchase-error" : "purchase-success", player,
                    Map.of("item", Text.color(item.name()), "price", Text.price(item.price())));
            config.failureSound().play(player);
            return;
        }

        Text.send(this, player, "purchase-success", player,
                Map.of("item", Text.color(item.name()), "price", Text.price(item.price())));
        (item.purchaseSound() == null ? config.purchaseSound() : item.purchaseSound()).play(player);
        if (config.closeOnPurchase()) player.closeInventory();
    }

    private boolean canFit(Player player, ItemStack item) {
        int remaining = item.getAmount();
        for (ItemStack current : player.getInventory().getStorageContents()) {
            if (current == null || current.getType().isAir()) remaining -= item.getMaxStackSize();
            else if (current.isSimilar(item)) remaining -= Math.max(0, current.getMaxStackSize() - current.getAmount());
            if (remaining <= 0) return true;
        }
        return remaining <= 0;
    }

    private void banner() {
        if (!config.banner()) return;
        getLogger().info("==============================================================");
        getLogger().info("   ██████╗  █████╗ ██████╗");
        getLogger().info("  ██╔════╝ ██╔══██╗██╔══██╗");
        getLogger().info("  ██║  ███╗███████║██████╔╝");
        getLogger().info("  ██║   ██║██╔══██║██╔═══╝");
        getLogger().info("  ╚██████╔╝██║  ██║██║");
        getLogger().info("   ╚═════╝ ╚═╝  ╚═╝╚═╝");
        getLogger().info("                    GapWildForge");
        getLogger().info("                   Developed by " + config.developer());
        getLogger().info("==============================================================");
        getLogger().info("Starting GapWildForge...");
        getLogger().info("Paper 1.21.11 detected.");
    }
}