# Aurelium Patch Notes
## v1.2.0 (Official Release)
### 🛒 Buy Orders System (New Feature)
- **Global Buy Orders (`/orders`)**: Players can now create global requests to purchase specific items at custom prices.
- **Full Command Support**: Create, fill, cancel, search, and list orders entirely via commands — `/orders create <item> <amount> <price>`, `/orders fill <id>`, `/orders cancel <id>`, `/orders search <query>`, `/orders my`.
- **Automated Fulfillment**: Sellers can browse active buy orders and instantly sell items directly from their inventory to fulfill requests.
- **Escrow & Refund System**: When creating an order, the exact amount of Aurels is held in escrow. Canceling an order via the "My Orders" menu instantly refunds any unspent currency.
- **Offline Reliability**: Items sold to a player's buy order while they are offline are safely deposited into their existing Auction House Collection Bin for easy retrieval via `/ah collect`.
- **Intelligent Searching**: The `/orders` menu integrates with the native Chat Prompt Manager. Players can use the new Compass icon to search/filter the entire Minecraft catalog for any obtainable item, or use the Oak Sign icon inside any specific category to filter just that category.
- **Expanded Item Options**: Players can now place Buy Orders for **all 120+ Enchanted Books** (including maximum levels like Sharpness V and Fortune III) and **Smelted Ores** (Ingots and Netherite) safely from the `/orders` menu.
- **Highly Configurable**: Server Owners can now use `config.yml` to completely disable the Buy Orders system, set a maximum number of active orders per player, configure minimum price limits, and impose a configurable percent-based Creation Fee to act as an economic sink.
- **Buyer Notifications**: Buyers are instantly notified in chat when their order is fulfilled. If the buyer is offline, they receive the notification when they next log in.
### � Market Stabilization (New Feature)
- **Price Floor**: Item prices can never drop below a configurable percentage of their original base value (default: 20%). Auto-farms can no longer crash items to zero.
- **Price Ceiling**: Item prices can never inflate above a configurable percentage of their base value (default: 500%).
- **Natural Price Recovery**: All prices passively drift back toward their original base price every 10 minutes (configurable). Even if nobody buys an item, its value slowly recovers on its own.
- All stabilization settings are fully configurable in `config.yml` under `market.price-floor`, `market.price-ceiling`, and `market.price-recovery`.
### ⚙️ Expanded Server Configuration
- **Master Toggles**: Server owners can now independently enable/disable the **Market** (`market.enabled`) and **Auction House** (`auction-house.enabled`) systems.
- **Economy Limits**: New `max-balance` (cap player wealth) and `min-pay-amount` (prevent micro-payments) settings.
- **Market Tuning**: New `default-sell-ratio` setting controls what fraction of the buy price is used as the default sell price for new items.
- **Auction House Limits**: New `max-duration`, `max-listings-per-player`, and `min-listing-price` settings for full control.
- **Buy Order Limits**: New `max-order-value` setting to cap the total value of a single order.
- **Custom Messages**: All economy messages (`balance`, `paid`, `received`, `insufficient-funds`, admin messages) are now fully customizable with MiniMessage formatting in `config.yml`.
### �🔧 Bug Fixes
- Fixed `java.sql.SQLException: stmt pointer is closed` caused by shared database connections being prematurely closed.
- Fixed `UnsupportedOperationException` when cancelling an order from the "My Orders" menu.
- Fixed potential `NullPointerException` in `EconomyManager` when saving balances for players whose names haven't been cached.
### ⚡ Internal Optimizations
- Switched all data maps across `OrderManager`, `MarketManager`, and `EconomyManager` to `ConcurrentHashMap` for improved thread safety with async database tasks.
- Enabled **SQLite WAL (Write-Ahead Logging)** mode for significantly reduced lock contention during concurrent reads and writes.
- Cached frequently-read config values (dynamic pricing toggle, alert thresholds) in `MarketManager` at initialization instead of parsing YAML on every transaction.
- Replaced all raw `e.printStackTrace()` calls across `AuctionManager`, `EconomyManager`, and `JoinListener` with Paper's structured `getComponentLogger().error()` for cleaner, leveled logging.
- Cleaned up unused imports across GUI classes.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }