π
1 file
7,882 chars
π
pasted-code-1778002849931.txt
txt
219 lines
βΆ
pasted-code-1778002849931.txt
txt
219 lines
sOrder Plugin - Implementation Plan
Context
Creating a modern INVENTORY GUI-based Minecraft order plugin for Paper 1.21+ where players can create/place orders and other players can complete them for money.
Confirmed Requirements:
- Paper 1.21+ with Maven build
- Vault Economy integration
- YAML file storage for orders
- LuckPerms permission-based order limits (sorder.limit.X)
- Manual collection (not auto-delivery)
- Percentage tax on completed orders
- Full admin system with INVENTORY GUI
Key Challenge: Building comprehensive, 100% configurable GUIs where every element (title, rows, materials, names, lore, slots, buttons, actions, sounds,
messages, borders, animations, etc.) is editable from config files with full HEX color, gradient, and placeholder support.
---
Order Limit System (Rank-Based)
- Permissions: sorder.limit.X where X is the number of orders
- Example: sorder.limit.5 allows player to create max 5 orders
- Default: sorder.limit.1 if no permission found
- Admin configurable default limit in config.yml
---
Database Schema (YAML)
orders:
:
owner: player-uuid
owner-name: PlayerName
items:
- material: DIAMOND_SWORD
amount: 1
enchantments:
DAMAGE_ALL: 5
FIRE_ASPECT: 2
price-per-item: 1000
status: PENDING/COMPLETED/CANCELLED
created-at: timestamp
completed-at: timestamp
completed-by: player-uuid
---
Commands & Permissions
Player Commands
ali command /order, /sorder, /orders
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββ¬βββββββββββββββββββββββββ
β Command β Permission β Description β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorder,/order,/orders β sorder.use β Open main INVENTORY GUI β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorder,/order,/orders help β sorder.use β Show help menu β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorder,/order,/orders myorder β sorder.use β Open player orders INVENTORY GUI β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorder,/order,/orders toggle delivery β sorder.toggle.delivery β Toggle delivery mode β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorder,/order,/orders toggle tax β sorder.toggle.tax β Toggle tax display β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorder,/order,/orders toggle soundsβ sorder.toggle.sounds β Toggle INVENTORY GUI sounds β
βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββ΄βββββββββββββββββββββββββ
Admin Commands
ββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββββββββββ
β Command β Permission β Description β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorderadmin β sorder.admin β Open admin INVENTORY GUI β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorderadmin reload β sorder.admin.reload β Reload all configs β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorderadmin clear β sorder.admin.clear β Clear player orders β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorderadmin delete β sorder.admin.delete β Delete specific order β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorderadmin history β sorder.admin.history β View all order history β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€
β /sorderadmin settax β sorder.admin.settax β Set tax percentage β
ββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββ΄βββββββββββββββββββββββββ
---
INVENTORY GUI Configurations
Main INVENTORY GUI (main-INVENTORY GUI.yml)
- Title: Configurable with %page% placeholder
- Rows: 1-6 (configurable)
- Buttons: Sort, Filter, Refresh, Search, Your Orders
- Sort and Filter a ki ki option thakbe ta image theke dekho and sob hobe working
- Items per page: 28 (after excluding buttons)
- Pagination: Next/Previous buttons (dynamic based on page)
Player Orders INVENTORY GUI (player-orders-INVENTORY GUI.yml)
- Title: Configurable
- Shows player's own orders
- New Order button: Slot 13 (empty list) or Slot 22 (with orders)
- Order limit indicator
New Order INVENTORY GUI (new-order-INVENTORY GUI.yml)
- Item display slot
- Amount input (configurable slot)
- Price input (configurable slot)
- Confirm/Cancel buttons
Item Selector INVENTORY GUI (item-selector-INVENTORY GUI.yml)
- All Minecraft items (Paper 1.21+)
- Search bar slot
- Sort/Filter buttons
- Pagination
- Category filters (weapons, tools, armor, etc.)
Enchantment INVENTORY GUI (enchantment-INVENTORY GUI.yml)
- Shows applicable enchantments for selected item
- Level selector (I - V or custom)
- Confirm/Cancel
Order Edit INVENTORY GUI (order-edit-INVENTORY GUI.yml)
- Edit item, amount, price
- Back button
Order Collect INVENTORY GUI (order-collect-INVENTORY GUI.yml)
- Shows completed order items
- Drop/Collect button
Admin INVENTORY GUI (admin-INVENTORY GUI.yml)
- Delete user orders
- Clear all orders
- View statistics
- Order history browser
- wipe single/targeted player data
- wipe full server data
---
Placeholders
General Placeholders
- generate according to you
Order Placeholders
- generate according to you
INVENTORY GUI Placeholders
- generate according to you
---
Border System
- remove border system
---
Color Support
- HEX: rrggbb (e.g., FF5500)
- Legacy: &a, &b, etc. (auto-converted to hex)
- Gradient: gradient(start:color1|end:color2)Textgradient
- Placeholder-replaced before color processing
---
Key Features
1. Pagination Logic: Page 1 shows Next only; last page shows Previous only; single page shows neither
2. Order Status Flow: PENDING β COMPLETED β COLLECTED
3. Enchantment System: Only shows enchantments applicable to selected item type
4. Search: Real-time item filtering
5. Sort/Filter: Multiple sort options (see in image)
6. Toggle System: Per-player settings for delivery mode, tax, sounds
Color processing happens at display time using ColorUtil class that handles:
1. Placeholder replacement
2. HEX color conversion
3. Gradient parsing
4. Legacy color conversion
Tax System
- Admin sets tax percentage: /sorderadmin settax
- Permission: sorder.admin.settax
- Tax deducted when order completed
- Configurable default in config.yml
- Tax display toggle per player: /sorder toggle tax
---
Economy System
- Vault Economy Integration - requires Vault and economy plugin (EssentialsX, etc.)
- Uses vault-engine: true in pom.xml
- Payment flow:
a. Completer clicks "Complete Order" and pays (amount Γ price) to order owner
b. Tax percentage deducted from payment (goes to server/admin pool)
c. Remaining amount transferred to order owner's balance
d. Order marked as COMPLETED
e. Owner can collect items from their orders INVENTORY GUI
Payment Confirmation: Before payment is processed, a confirmation INVENTORY GUI shows:
- Order items with enchantments
- Amount needed
- Price per item
- Total cost
- Tax amount
- Confirm/Cancel buttons
Kodari can make mistakes. Review important code before using.
Files
No files in this session
Code