errorx.net

FxOrder — Advanced Minecraft Order System

Develop a complete, production-ready Minecraft plugin named FxOrder with a premium GUI-based player order system.

The plugin should work like a professional SMP order plugin, allowing players to create item orders, request specific quantities, set prices per item, deliver items to other players' orders, receive payments, manage their own orders, and collect delivered items.

The plugin must be lightweight, optimized, configurable, and compatible with Paper 1.21.4.

Do not create a basic prototype. Implement all commands, GUIs, inventory interactions, data persistence, economy transactions, pagination, and order management systems.

---

  1. PLUGIN INFORMATION

Plugin Name: FxOrder Author: NotErrorXPlayZz Main Prefix: "&#69F43F&lORDER &8▶"

Technical Requirements

  • Minecraft: Paper 1.21.4.
  • Java 21.
  • Economy integration: Vault with a supported economy provider.
  • Support modern Minecraft materials and enchantments.
  • Support RGB/HEX colors using "&#RRGGBB".
  • Support legacy Minecraft color codes.
  • Use YAML for configuration and persistent data.
  • All GUIs must be configurable.
  • All GUI buttons must play "UI_BUTTON_CLICK" when clicked.
  • Prevent players from taking GUI buttons or manipulating protected GUI inventories.
  • Prevent item duplication, money duplication, and order exploits.
  • All important data must persist after server restarts.

Required Folder Structure

FxOrder/ ├── config.yml ├── plugin.yml ├── messages.yml ├── guis/ │ ├── orders.yml │ ├── your-order.yml │ ├── create-order.yml │ ├── order-selection.yml │ ├── enchantments.yml │ ├── order-confirm.yml │ ├── order-setting.yml │ ├── delete-confirm.yml │ └── collect-order.yml └── data/ ├── players/ │ └── <uuid>.yml └── orders/ └── <order-id>.yml

The plugin must automatically create missing files and folders.

Store player order ownership, order IDs, item materials, quantities, prices, enchantments, delivered items, payments, and completion states persistently.

Use UUIDs as player identifiers instead of relying exclusively on player names.

---

  1. CONFIG.YML

Create a stylish configuration file with a professional appearance.

Include a header similar to:

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

FxOrder - Advanced Order System

Plug Made By NotErrorXPlayZz

Version: 1.0.0

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

settings: prefix: "&#69F43F&lORDER &8▶" debug: false

economy: enabled: true provider: VAULT

gui: click-sound: UI_BUTTON_CLICK play-click-sound: true

orders: maximum-active-orders-per-player: 50 minimum-order-amount: 1 maximum-order-amount: 1000000 minimum-price-per-item: 0.01 maximum-price-per-item: 1000000000 allow-self-delivery: false

delivery: require-exact-item: true require-matching-enchantments: true return-items-on-cancel: true

storage: autosave: true

These values must be configurable.

Validate all configuration values and handle missing or invalid values safely.

---

  1. PLUGIN.YML

Create a proper plugin.yml.

name: FxOrder version: 1.0.0 main: your.package.FxOrder api-version: '1.21' author: NotErrorXPlayZz description: Advanced GUI-Based Minecraft Order System

depend: - Vault

commands: order: description: Open the order system usage: /order aliases: - orders

permissions: fxorder.use: default: true fxorder.create: default: true fxorder.deliver: default: true fxorder.admin: default: op

Replace "your.package.FxOrder" with the actual Java main class.

Implement proper permission checks.

---

  1. COMMANDS

Implement the following commands.

Player Commands

"/order"

Open the main Orders GUI.

"/orders"

Alias for "/order".

"/order <item name>"

Open the Orders GUI filtered to the specified item.

Examples:

/order DIAMOND /order IRON_INGOT /order NETHERITE_INGOT

The filter must match actual Minecraft material names.

"/order create <item> <amount> <price>"

Create an order directly using the command.

Example:

/order create DIAMOND 64 500

This creates an order requesting 64 diamonds at $500 per diamond.

The total maximum payment for this order is $32,000.

The command must validate the material, amount, price, player's balance, and permissions.

If the GUI-based order creation system is used, follow the same validation and payment rules.

Administrative Command

"/order reload"

Reload the configuration, messages, and GUI configuration files.

Permission:

"fxorder.admin"

Send the configured reload message after a successful reload.

Do not reset existing orders when reloading.

---

  1. MAIN ORDERS GUI

File: "guis/orders.yml"

GUI Settings

menu_title: "&8☀ Orders [%current_page%/%max_page%]" size: 54

The GUI has 54 slots, numbered 0–53.

Order Items

Slots:

"0–44"

Display every active order using its actual requested item as the GUI item material.

Do not use random blocks as order icons.

order-item: material: PLAYER_REQUESTED_ITEM display_name: "&#FF3800%player%'s &fOrder" lore: - "&8Orders" - "" - "&#F9C22B● &fItem: &#F9C22B%item% &f× %amount%" - "&#52F00E● &fPrice: &#52F00E%price% &feach" - "" - "&#F04F78● &fDelivered: &#F04F78%current_delivered%/%max_delivered%" - "&#91DB69● &fPaid: &#91DB69%current_paid%/%max_paid%" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Deliver"

Use the correct requested quantity and total order quantity in the placeholders.

When a player clicks an order, open the delivery inventory GUI for that order.

The GUI must display only valid active orders that have not been completed or cancelled.

Previous Page

previous-page: material: RED_STAINED_GLASS_PANE slot: 45 display_name: "&#FF2E2E&lPREVIOUS PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to return to" - "&fthe previous page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Return"

Next Page

next-page: material: LIME_STAINED_GLASS_PANE slot: 53 display_name: "&#30FF00&lNEXT PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to go to" - "&fthe next page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Go"

Sorting

sort: material: MINECART_WITH_FURNACE slot: 47 display_name: "&#FF3800&lSORTING" lore: - "&8Orders" - "" - "&8● &#FF3800Most Paid" - "&7● &fMost Delivered" - "&7● &fRecently Listed" - "&7● &fMost money per item" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Change"

Implement all four sorting modes.

  • Most Paid: orders with the highest accumulated payment first.
  • Most Delivered: orders with the highest delivered quantity first.
  • Recently Listed: newest orders first.
  • Most Money Per Item: highest price per item first.

Remember the selected sorting mode while the player navigates the GUI.

Search

search: material: RECOVERY_COMPASS slot: 48 display_name: "&#47B6FF&lSEARCH" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to search any" - "&fspecific item!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Search"

On clicking Search, open a sign-input interface.

Allow players to enter a Minecraft item name.

After submission, reopen the Orders GUI showing only matching orders.

If no matching orders exist, display a configurable error message.

The search must work across every order page.

Refresh Page

refresh-page: material: CLOCK slot: 50 display_name: "&#FFD847&lREFRESH PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to refresh" - "&fthe menu" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Refresh"

Refresh the displayed order data without resetting the current search or sorting mode.

Your Orders

your-order: material: CHEST slot: 51 display_name: "&#9977FC&lYOUR ORDER" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to view your" - "&flisted orders!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto View"

Open the player's personal order-management GUI.

GUI Slot Validation

The original design places some buttons in slots that overlap other buttons.

Resolve these conflicts in the actual configuration.

Use slots 0–44 for orders and slots 45–53 for controls. Each control must have a unique slot.

Do not silently overwrite GUI buttons.

---

  1. YOUR ORDERS GUI

File: "guis/your-order.yml"

menu_title: "&8▶ Orders | Your Order" size: 27

Display the player's own active orders in this GUI.

Use the actual requested item as the icon.

Allow pagination if the player has more orders than can fit.

Clicking an order opens its Order Settings GUI.

Create Order Button

create_order: material: LIME_STAINED_GLASS_PANE slot: 26 display_name: "&#30FF00&lCREATE ORDER" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Create"

Clicking this button opens the Create Order GUI.

---

  1. CREATE ORDER GUI

File: "guis/create-order.yml"

menu_title: "&8Create Your Order" size: 54

Create a complete item-selection GUI.

Item Catalogue

Use slots 0–44 for selectable Minecraft items.

Generate the catalogue from the Bukkit/Paper material registry.

Include valid items from A–Z, including items such as:

  • Stone
  • Diamond
  • Iron Ingot
  • Netherite Ingot
  • Enchanted Books
  • Tools
  • Armor
  • Weapons
  • Food
  • Building Blocks
  • Redstone Components
  • Potions
  • Spawn Eggs
  • Command Blocks
  • Other valid Minecraft materials

Include items such as command blocks even if they are unobtainable in normal survival.

Do not include AIR, invalid materials, or duplicate material entries.

Use alphabetical sorting by display name or material key.

Support pagination for the complete catalogue.

Clicking an item opens the Order Selection GUI for that specific item.

Previous Page

previous-page: material: RED_STAINED_GLASS_PANE slot: 45 display_name: "&#FF2E2E&lPREVIOUS PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to return to" - "&fthe previous page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Return"

Next Page

next-page: material: LIME_STAINED_GLASS_PANE slot: 44 display_name: "&#30FF00&lNEXT PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to go to" - "&fthe next page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Go"

The next-page button must not overlap an item slot.

Move it to an available control slot in the final implementation.

---

  1. ORDER SELECTION GUI

File: "guis/order-selection.yml"

menu_title: "&8▶ Order Selection" size: 27

This GUI configures the item the player selected in the Create Order GUI.

Selected Item

Slot 10:

Display the exact selected item.

If the selected item is a diamond, display a diamond. If the selected item is a diamond sword, display a diamond sword.

Amount Button

amount: material: CHEST slot: 13 display_name: "&#FF3800&lAMOUNT" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto set Amount"

Clicking this button opens a sign-input interface.

The player enters the desired quantity.

Validate the entered quantity against the configured minimum and maximum.

Price Button

price: material: EMERALD slot: 14 display_name: "&#F30FF0&lPRICE" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto set Price"

Clicking this button opens a sign-input interface for the price per item.

For example:

  • Amount: 64 diamonds
  • Price: $500 per diamond
  • Maximum order payment: $32,000

Do not interpret the price as the total price for the entire order.

The order cannot be confirmed until both amount and price have been entered and validated.

Confirming the Item

If the selected item is a normal material, allow the player to proceed to order confirmation.

If the selected item is a tool, weapon, armor piece, or another enchantable item, open the Enchantments GUI first.

Preserve the chosen amount and price when switching between GUIs.

---

  1. ENCHANTMENTS GUI

File: "guis/enchantments.yml"

menu_title: "&8Order | Enchantments" size: 54

Maximum pages: 5.

Selected Item Preview

Slot 10:

Display the selected armor, weapon, or tool.

The preview must visually show the currently selected enchantments.

When the player selects an enchantment, apply it to the preview.

When the player removes an enchantment, remove it from the preview.

Do not modify the player's real inventory while they are configuring the order.

Enchantment Book Slots

Use the following slots:

  • 12–16
  • 21–25
  • 30–34
  • 39–43

Display enchantment books for enchantments that can normally be applied to the selected item in survival gameplay.

Examples:

Diamond Sword:

  • Sharpness
  • Smite
  • Bane of Arthropods
  • Unbreaking
  • Mending
  • Looting
  • Fire Aspect
  • Knockback

Diamond Helmet:

  • Protection
  • Fire Protection
  • Blast Protection
  • Projectile Protection
  • Unbreaking
  • Mending
  • Respiration
  • Aqua Affinity
  • Thorns

Diamond Pickaxe:

  • Efficiency
  • Fortune
  • Silk Touch
  • Unbreaking
  • Mending

Only show enchantments applicable to the selected item.

Respect normal enchantment compatibility.

Do not allow mutually incompatible enchantments to be selected together unless explicitly enabled in the configuration.

Enchantment Levels

Display valid enchantment levels as separate selectable books.

Examples:

Protection:

  • Protection I
  • Protection II
  • Protection III
  • Protection IV

Unbreaking:

  • Unbreaking I
  • Unbreaking II
  • Unbreaking III

Sharpness:

  • Sharpness I
  • Sharpness II
  • Sharpness III
  • Sharpness IV
  • Sharpness V

Use the correct maximum levels for each enchantment.

Support up to five pages so the GUI can display the complete selection catalogue.

Do not generate duplicate enchantment-level entries across pages.

Enchantment Book Lore

lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Select"

Enchantment Selection Logic

  • Clicking an unselected enchantment selects it.
  • Clicking the same selected enchantment again removes it.
  • Update the preview item immediately.
  • Preserve the selected enchantments while changing pages.
  • Do not reset the selection when the GUI is refreshed.

Confirm Order

confirm-order: material: LIME_STAINED_GLASS_PANE slot: 35 display_name: "&#30FF00&lCONFIRM" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Confirm"

Confirm the selected item, amount, price, and enchantments.

Continue to the final order confirmation flow.

Cancel Order

cancel-order: material: RED_STAINED_GLASS_PANE slot: 34 display_name: "&#FF2E2E&lCANCEL" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Cancel"

Cancel the current configuration and return to the Create Order GUI without creating an order.

Previous Page

previous-page: material: RED_SHULKER_BOX slot: 48 display_name: "&#FF2E2E&lPREVIOUS PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to return to" - "&fthe previous page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Return"

Page Indicator

page-list: material: SKULL_BANNER_PATTERN slot: 49 display_name: "&#F9C22B&lPAGE LIST" lore: - "&8Orders" - "" - "&bInformation:" - "&fPage: &#F9C22B%current_page%/%max_page%"

Next Page

next-page: material: LIME_SHULKER_BOX slot: 50 display_name: "&#30FF00&lNEXT PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to go to" - "&fthe next page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Go"

---

  1. ORDER CREATION AND PAYMENT

When a player confirms a new order:

  1. Validate the item, amount, price, enchantments, and permissions.
  2. Calculate the total order value.
  3. Check the player's balance.
  4. Reserve the required funds using Vault.
  5. Create a unique order ID.
  6. Store the order in the persistent data folder.
  7. Display the order in the main Orders GUI.
  8. Display the order in its owner's Your Orders GUI.
  9. Send the configured order creation message.
  10. Broadcast the order creation announcement if broadcasting is enabled.

Important Economy Rules

The total maximum payment is:

"Order Amount × Price Per Item"

For example:

  • Requested amount: 64
  • Price per item: $500
  • Maximum total payment: $32,000

Reserve the full order budget when the order is created.

When a player delivers 10 valid items, pay them $5,000.

Only pay for the quantity actually accepted by the order.

Never pay twice for the same delivered item.

Do not allow the order owner to withdraw or spend reserved money.

If the order is cancelled, refund the unused reserved balance.

If an order is completed, release any unused reservation according to the final accepted quantity and the configured cancellation/completion rules.

Use safe economy transactions and prevent concurrent delivery operations from processing the same order twice.

---

  1. ORDER DELIVERY GUI

When a player clicks an order in the main Orders GUI, open a delivery inventory GUI.

GUI Settings

menu_title: "&8Deliver Order" size: 45

Allow the player to place items into the inventory.

The delivery inventory must accept only the exact requested material and, when applicable, the exact required enchantments.

Items that do not match the order must never count toward delivery.

Support partially filled orders.

For example, if an order requests 64 diamonds and the player delivers 20:

  • Accept the 20 diamonds.
  • Pay the correct amount.
  • Update the delivered quantity.
  • Keep the remaining quantity available to other players.

The GUI must not allow users to extract unrelated items or manipulate protected controls.

Closing Behavior

When the player closes the delivery GUI, open the Order Confirmation GUI.

If the player closes the GUI without placing any items, close the interaction cleanly without creating a delivery.

If the player placed items, preserve the pending delivery safely.

Never delete or duplicate items when the GUI closes.

---

  1. ORDER CONFIRMATION GUI

File: "guis/order-confirm.yml"

menu_title: "&8Confirm Order" size: 27

Confirm Button

confirm-order: material: LIME_STAINED_GLASS_PANE slot: 10 display_name: "&#30FF00&lCONFIRM" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Confirm"

When clicked:

  1. Revalidate the pending delivery.
  2. Verify the order remains active.
  3. Verify the remaining quantity.
  4. Verify all submitted items.
  5. Calculate the exact payment.
  6. Consume only accepted items.
  7. Pay the delivering player.
  8. Update the order's delivered quantity and payment totals.
  9. Save all changes.
  10. Send the configured success messages.

If the order is already complete or cancelled, reject the transaction and safely return the submitted items.

Item Preview

item: material: REQUESTED_ORDER_ITEM slot: 13 display_name: "&#FF3800%amount%x &f%item%" lore: - "&8Orders" - "" - "&#F9C22B● &fAmount: &#F9C22B%amount%" - "&#30FF00● &fPrice: &#30FF00%price%" - ""

"%amount%" represents the amount of matching items being delivered in this transaction.

"%price%" represents the total money the player will receive for this delivery.

For example, delivering 10 diamonds at $500 each displays $5,000.

Cancel Button

cancel-order: material: RED_STAINED_GLASS_PANE slot: 16 display_name: "&#FF2E2E&lCANCEL" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Cancel"

Clicking Cancel must return the player to the delivery inventory with their pending items preserved.

If the player closes the delivery inventory again, reopen the confirmation GUI.

If the player eventually exits the delivery process, safely return all unsubmitted items to their inventory.

If the inventory has insufficient space, use a reliable overflow-handling system rather than deleting items.

If the player disconnects during delivery, recover the pending transaction safely after reconnecting.

Never force a player to lose their items or accept a delivery without confirmation.

---

  1. ORDER SETTINGS GUI

File: "guis/order-setting.yml"

menu_title: "&8Order | Settings" size: 27

Display the player's selected order and its current state.

Provide controls for deleting and collecting the order.

Delete Order

delete-order: material: RED_STAINED_GLASS_PANE slot: 10 display_name: "&#FF2E2E&lDELETE" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Delete"

Clicking Delete opens a separate deletion confirmation GUI.

Do not immediately delete the order without confirmation.

Collect Order

collect-order: material: LIME_STAINED_GLASS_PANE slot: 16 display_name: "&#69F43F&lCOLLECT" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Collect"

Clicking Collect opens the Collect Order GUI for the selected order.

The collection GUI must display only items delivered to that particular order.

Diamond orders must never display items belonging to an iron order.

---

  1. DELETE CONFIRMATION GUI

File: "guis/delete-confirm.yml"

menu_title: "&8Confirm Order Deletion" size: 27

Display the order being deleted in slot 13.

Cancel

cancel: material: RED_STAINED_GLASS_PANE slot: 10 display_name: "&#FF2E2E&lCANCEL" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Cancel"

Clicking Cancel returns to Order Settings without deleting the order.

Confirm

confirm: material: LIME_STAINED_GLASS_PANE slot: 16 display_name: "&#69F43F&lCONFIRM" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Confirm"

Clicking Confirm must:

  1. Verify the player owns the order.
  2. Verify that the order is still deletable.
  3. Mark the order as cancelled.
  4. Prevent additional deliveries.
  5. Refund any unused reserved funds.
  6. Preserve audit-safe information about previous deliveries.
  7. Remove the order from active order listings.
  8. Save the updated data.

Previously delivered items must not disappear when the order is deleted.

Previously paid deliveries must not be reversed.

The owner must be able to collect items that were delivered before cancellation.

---

  1. COLLECT ORDER GUI

File: "guis/collect-order.yml"

menu_title: "&8Collect Order" size: 54

This GUI must be associated with a specific order ID.

If a player owns two orders, such as a diamond order and an iron order, each order must have its own separate collection inventory.

Collection Items

Display the items delivered to the selected order.

Preserve enchantments and item metadata.

Use slots 0–44 for collectible items and slots 45–53 for controls.

Support pagination.

When an item is collected, remove only the collected amount from the order's stored delivery inventory.

If the player's inventory is full, do not delete the uncollected items.

Previous Page

previous-page: material: RED_STAINED_GLASS_PANE slot: 48 display_name: "&#FF2E2E&lPREVIOUS PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to return to" - "&fthe previous page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Return"

Next Page

next-page: material: LIME_STAINED_GLASS_PANE slot: 50 display_name: "&#30FF00&lNEXT PAGE" lore: - "&8Orders" - "" - "&bInformation:" - "&fClick here to go to" - "&fthe next page!" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Go"

Take All

take-all: material: CHEST slot: 52 display_name: "&#F9C22B&lTAKE ALL" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Take all"

Take as many items from the current page as can safely fit in the player's inventory.

If the player's inventory is full, leave all remaining items stored.

Players must be able to navigate to another page and use Take All again.

Drop All

drop-all: material: MINECART_WITH_CHEST slot: 53 display_name: "&#9977FC&lDROP ALL" lore: - "&8Orders" - "" - "&#F9C22B▶ &l&nCLICK&r &#F9C22Bto Drop all"

Drop all collectible items on the current page into the world at the player's location.

Only drop the actual order items.

Never drop GUI control buttons.

Players must be able to navigate to another page and use Drop All again.

Use safe item spawning and persistent data updates to prevent duplication if the server crashes or the player disconnects during collection.

---

  1. MESSAGES.YML

All messages must be configurable.

Use the configured prefix automatically where appropriate.

General Messages

reload: "%prefix% &fConfiguration reloaded successfully."

order-create: broadcast: enabled: true message: "%prefix% &#69F43F%player% &fhas ordered &#69F43F%amount%x %item% &ffor &#69F43F$%price% each &fUse &#69F43F/order &fto view it."

order-filled: "%prefix% &fYou have delivered &#69F43F%amount%× %item%&f."

order-delivered: "%prefix% &#69F43F%player% &fhas delivered &#69F43F%amount%× %item%&f."

order-fullfilled-message: "%prefix% &fYou have completed &#69F43F%order-complete% &forder(s)."

order-already-complete: "%prefix% &#FF2E2EError: &fThis order is already complete."

Correct spelling mistakes in the message keys and use consistent placeholder names internally.

Error Message Formatting

Every error message must use the color:

"&#FF2E2E"

Every error must contain the word:

"Error:"

Examples:

errors: no-permission: "%prefix% &#FF2E2EError: &fYou don't have permission to do this." invalid-item: "%prefix% &#FF2E2EError: &fInvalid Minecraft item." invalid-amount: "%prefix% &#FF2E2EError: &fEnter a valid amount." invalid-price: "%prefix% &#FF2E2EError: &fEnter a valid price per item." insufficient-money: "%prefix% &#FF2E2EError: &fYou don't have enough money." order-not-found: "%prefix% &#FF2E2EError: &fThis order could not be found." order-complete: "%prefix% &#FF2E2EError: &fThis order is already complete." order-cancelled: "%prefix% &#FF2E2EError: &fThis order has been cancelled." no-orders-found: "%prefix% &#FF2E2EError: &fNo matching orders were found." invalid-enchantment: "%prefix% &#FF2E2EError: &fThis enchantment cannot be applied to the selected item." delivery-mismatch: "%prefix% &#FF2E2EError: &fYour items do not match this order." inventory-full: "%prefix% &#FF2E2EError: &fYour inventory is full." self-delivery: "%prefix% &#FF2E2EError: &fYou cannot deliver your own order." economy-unavailable: "%prefix% &#FF2E2EError: &fThe economy system is unavailable." invalid-input: "%prefix% &#FF2E2EError: &fEnter a valid value." order-limit: "%prefix% &#FF2E2EError: &fYou have reached your active order limit."

Add any other required error messages using the same format.

Never leave errors without a proper message.

---

  1. PLACEHOLDER SYSTEM

Implement internal placeholders for GUI items and messages.

Support:

%prefix% %player% %item% %amount% %price% %total_price% %current_page% %max_page% %current_delivered% %max_delivered% %current_paid% %max_paid% %order_id% %order_complete% %enchantment% %enchantment_level%

Use correct context for every placeholder.

For order items:

  • "%player%": order owner's name.
  • "%item%": requested item's readable name.
  • "%amount%": requested or delivered quantity, according to the relevant GUI.
  • "%price%": price per item or transaction total, according to the documented context.
  • "%total_price%": total order budget.
  • "%current_delivered%": quantity delivered so far.
  • "%max_delivered%": requested total quantity.
  • "%current_paid%": total amount paid to deliverers.
  • "%max_paid%": total order budget.

Do not mix price-per-item and total-price values.

Format large currency values clearly and consistently.

---

  1. INVENTORY AND EXPLOIT PROTECTION

Implement comprehensive inventory event protection.

  • Prevent players from taking GUI buttons.
  • Prevent shift-click exploits.
  • Prevent number-key swaps involving protected GUI slots.
  • Prevent double-click collection exploits.
  • Prevent drag events from modifying protected GUI controls.
  • Prevent invalid item insertion into delivery inventories.
  • Preserve legitimate items when closing or cancelling GUIs.
  • Protect against double payments.
  • Protect against duplicate deliveries.
  • Protect against concurrent delivery attempts.
  • Protect against stale GUI interactions after an order is completed or cancelled.
  • Validate the order state again when confirming delivery.
  • Persist pending transactions safely.
  • Handle player disconnects.
  • Handle server restarts.
  • Never delete items because an inventory is full.
  • Never let players withdraw GUI buttons.
  • Never allow players to collect another player's private order inventory.

Use unique order IDs and reliable transaction handling.

---

  1. GUI CONFIGURATION AND QUALITY

All GUI titles, sizes, buttons, materials, slots, display names, and lore must be configurable in the "guis/" folder.

Use consistent color formatting.

Every GUI button must play the configured "UI_BUTTON_CLICK" sound when clicked.

Do not play the button sound for invalid or cancelled interactions unless configured.

Handle invalid configuration values gracefully.

Check for duplicate button slots during configuration loading and log helpful warnings.

The plugin should not crash if an optional GUI item is missing.

---

  1. PERFORMANCE REQUIREMENTS

Keep FxOrder lightweight.

  • Avoid unnecessary repeating tasks.
  • Avoid blocking the main server thread with file operations.
  • Avoid repeatedly scanning the complete material registry for every GUI opening.
  • Cache the material catalogue and enchantment catalogue.
  • Save order changes safely.
  • Use asynchronous file operations where safe.
  • Perform Bukkit inventory and entity operations on the main server thread.
  • Avoid unnecessary external dependencies.
  • Use UUID-based player data.
  • Keep the plugin compatible with Paper 1.21.4 and Java 21.

---

  1. FINAL DEVELOPMENT REQUIREMENTS

Deliver the complete FxOrder source code and all required configuration files.

The finished plugin must include:

  1. Complete Java source code.
  2. Main plugin class.
  3. Command executor and tab completion.
  4. Vault economy integration.
  5. Order creation and reservation system.
  6. Complete GUI manager.
  7. Main Orders GUI.
  8. Search and sorting.
  9. Create Order GUI.
  10. Complete Minecraft material catalogue.
  11. Order Selection GUI.
  12. Enchantment selection and preview.
  13. Delivery inventory.
  14. Order Confirmation GUI.
  15. Order Settings GUI.
  16. Delete Confirmation GUI.
  17. Collect Order GUI.
  18. Pagination.
  19. Messages and error handling.
  20. Persistent YAML data storage.
  21. Inventory exploit protection.
  22. Reload support.
  23. All required YAML files.
  24. Maven or Gradle build configuration.
  25. A successfully compiled plugin JAR.

Before finishing, test the entire order lifecycle:

Create Order → Reserve Money → Display Order → Deliver Items → Confirm Delivery → Pay Deliverer → Update Order → Collect Items → Complete Order.

Also test:

  • Partial deliveries.
  • Multiple orders for different items.
  • Enchanted item orders.
  • Cancellation and refunds.
  • Full inventories.
  • Invalid deliveries.
  • Player disconnections.
  • Server restarts.
  • Pagination and searching.
  • Sorting.
  • Duplicate-click protection.
  • Concurrent deliveries.
  • Economy failures.

Do not provide incomplete classes, pseudocode, placeholder methods, or nonfunctional GUI buttons.

The final result must be a complete, working, optimized Minecraft plugin named FxOrder, authored by NotErrorXPlayZz, with a professional GUI design and reliable order handling.

Kodari AI
KodariOct 26 at 5:32 am 3
FxOrder
FxOrder is a premium GUI-based Minecraft order system plugin for Paper 1.21.4. Players create item orders with specific quantities and prices, browse active orders through a configurable paginated interface, and deliver matching items to earn money via Vault economy. The plugin features a complete material catalogue, enchantment selection for tools and armor, persistent YAML data storage, comprehensive inventory exploit protection, and a full order lifecycle including creation, delivery, confirmation, collection, and cancellation with safe fund reservation and refunds.
  1. Set up the Paper 1.21.4 project and default configuration files.

  2. Implement YAML-backed orders, escrow/economy handling, commands, and recovery-safe pending deliveries.

  3. Build the configurable menus, sign input, pagination, sorting, enchantment selection, delivery, and collection flows.

Created FxOrder with Paper 1.21.4 / Java 21 build configuration, Vault economy integration, configurable GUI and message files, YAML-backed orders and pending deliveries, /order commands, sign input, sorting and pagination, enchantment selection, delivery confirmation, cancellation refunds, and per-order item collection.

The project is set up to compile in Kodari; I haven’t exercised the lifecycle on a live Paper server with Vault.

To get the JAR: click Compile in the top bar (on phone: ⋮ → Compile Project), click Compile in the window, then click Download when the build succeeds.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
21 1,861
src/main/java/com/noterrorxplayzz/fxorder/FxOrder.java
package com.noterrorxplayzz.fxorder;

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

import java.io.File;

public final class FxOrder extends JavaPlugin {
    private Messages messages;
    private OrderManager orders;
    private MenuManager menus;
    private Economy economy;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResourceIfMissing("messages.yml");
        for (String file : new String[]{"orders.yml", "your-order.yml", "create-order.yml", "order-selection.yml", "enchantments.yml", "order-confirm.yml", "order-setting.yml", "delete-confirm.yml", "collect-order.yml", "delivery-order.yml"}) saveResourceIfMissing("guis/" + file);
        new File(getDataFolder(), "data/orders").mkdirs();
        new File(getDataFolder(), "data/players").mkdirs();
        RegisteredServiceProvider<Economy> registration = getServer().getServicesManager().getRegistration(Economy.class);
        if (registration == null || !getConfig().getBoolean("settings.economy.enabled", true)) {
            getLogger().severe("Vault and a supported economy provider are required.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        economy = registration.getProvider();
        messages = new Messages(this);
        orders = new OrderManager(this, economy);
        menus = new MenuManager(this);
        getServer().getPluginManager().registerEvents(menus, this);
        OrderCommand executor = new OrderCommand(this);
        getCommand("order").setExecutor(executor);
        getCommand("order").setTabCompleter(executor);
        getServer().getPluginManager().registerEvents(new JoinListener(this), this);
        getLogger().info("FxOrder enabled with " + orders.allActive().size() + " active order(s).");
    }

    private void saveResourceIfMissing(String resource) {
        if (!new File(getDataFolder(), resource).exists()) saveResource(resource, false);
    }

    public void reloadFiles() {
        reloadConfig();
        messages.reload();
        menus.reload();
    }

    @Override
    public void onDisable() {
        if (menus != null) menus.shutdown();
    }

    public Messages messages() { return messages; }
    public OrderManager orders() { return orders; }
    public MenuManager menus() { return menus; }
    public Economy economy() { return economy; }

    private static final class JoinListener implements org.bukkit.event.Listener {
        private final FxOrder plugin;
        private JoinListener(FxOrder plugin) { this.plugin = plugin; }
        @org.bukkit.event.EventHandler
        public void onJoin(org.bukkit.event.player.PlayerJoinEvent event) {
            Bukkit.getScheduler().runTaskLater(plugin, () -> plugin.menus().resumePending(event.getPlayer()), 1L);
        }
    }
}