# Aurelium Patch Notes
## v1.1.0 (Official Release)
### 📦 Inventory & Shop Logic Updates
- **Live UI Updates**: The `/market` and `/stocks` menus automatically refresh every **1 second** natively while open.
- **Performance Optimized**:
- **Viewer-Only Refresh**: Logic remains completely dormant unless a player has a menu open.
- **Batched Disk I/O**: Transaction data is saved in backgrounds batches, preventing server "hiccups" during high-volume trading.
- **O(1) Data Access**: Market prices use ultra-fast local caching for near-zero CPU impact.
- **Smart Inventory Logistics**: Purchasing items securely fills your existing partial stacks instead of strictly demanding empty inventory slots.
- Transactions are properly blocked if you try to buy more than your combined available space can hold, preventing lost items.
- **Auction House GUI Integration (No more commands)**:
- Overhauled the `/ah` GUI so that `sell`, `bid`, and `offers` no longer require you to type complex commands.
- Added a new **"Sell Item"** button inside the main `/ah` menu. Clicking it will simply ask you to type the price in chat while holding the item.
- Clicking **"Custom Bid"** or **"Make Offer"** on an item inside the GUI now triggers an interactive chat prompt. The GUI seamlessly waits for you to type a number in chat and then processes the bid/offer automatically.
- **New Safety Confirmation Menus**: When choosing to "Buy It Now" or finalize a standard Bid inside the AH, you will be instantly taken to a beautiful new Confirmation Screen to prevent completely accidental purchases.
- **Global GUI Search Feature**:
- Clicking search allows you to type a keyword in chat (e.g., "Diamond") to instantly filter the menu.
- The Market search is **Global**, meaning it scans all categories simultaneously to find your item instantly.
- **New Command: `/ah search <query>`**:
- Jump directly into a filtered Auction House view without clicking any buttons.
- Supports multi-word searches like `/ah search Enchanted Book`.
- **User Experience Note**:
- Every common action (Searching, Bidding, Making Offers, and Selling) can be done either via the traditional commands listed above **OR** by simply clicking the corresponding buttons directly inside the GUIs for a more modern experience.
### 🧹 Code Optimization & Cleanup
- Removed unused or "dead code" (e.g. tracking variables, unused data imports) across multiple GUI and Server systems.
- **Smart Configuration Auto-Merge**:
- The plugin now automatically detects and adds new configuration keys (like Alerts or Pricing Rates) to your existing `config.yml` on startup.
- This ensures a seamless upgrade path where your custom values are preserved while new features are enabled automatically.
- Updated project versioning to **1.1.0** across all configuration and build files.
### 🐛 Bug Fixes
- **Auction House Logic Loop Fix**:
- Fixed a critical rendering bug where the entire Auction House menu would appear empty due to a missing logic block bracket during the button injection phase.
- **Stocks GUI (-100% Spawner Bug)**:
- Fixed an issue where all spawners in the `/stocks` menu displayed a worth of 0% or -100%.
- The menu now accurately reads the custom spawner name instead of just reading "Spawner", correctly linking the specific mob type (e.g., Zombie Spawner) to its base market price.
- Spawners now correctly visually render their specific mob type directly within the GUI.
- **Auto-Complete Command Spam (Player Names)**:
- Fixed an overarching issue where commands like `/ah`, `/market`, `/sell`, and `/stocks` were incorrectly suggesting the names of all online server players.
- `/ah` now correctly suggests its exact sub-commands (`sell`, `bid`, `offers`, `offer`, `collect`, `cancel`) instead of names.
- The other commands explicitly block player name suggestions, keeping the chat interface clean and distraction-free.
### 📈 Market Economy Adjustments
- **Dynamic Sell Pricing Engine**:
- Overhauled how the market calculates the money a player receives when selling bulk items.
- The sell value now accurately and transparently scales proportionally with the `/stocks` fluctuations in real-time. If the buy price inflates by 20%, the sell reward inflates by precisely 20%.
- Selling bulk items in the `/sell` GUI now correctly triggers the dynamic price crash logic (`onTransaction`), guaranteeing the market value goes down as players dump mass supplies.
- **Auto-Updating Market & Stocks GUIs**:
- Both `/market` and `/stocks` now feature an ultra-fast live **1-second (20-tick)** auto-refresh engine. If you have the menu open, prices will physically update completely live in front of you every single second as other players buy/sell items or as the server economy ticks forward.
- **Live Auction House Timers**: This ultra-fast refresh has also been applied to the `/ah` menu, ensuring that item expiration timers count down smoothly in real-time while a player is viewing the menu.
- **Improved Price Stability**:
- Recalibrated the default dynamic price adjustment from 1% down to **0.1% (0.001)** per transaction.
- This ensures a much more stable and realistic economy, preventing extreme price spikes during high-volume trading while still maintaining a responsive market.
- **Market Crash Alerts**:
- The plugin now monitors "High Value" items (items with a base price > 200).
- When an item's price crashes by 50% or more (due to player selling), a server-wide broadcast encourages players to grab the bargain.
### ⚡ Performance & Optimization
- **Zero-Idle Engine**: GUI refresh logic remains dormant when no players are viewing economy menus, ensuring zero CPU overhead during idle periods.
- **Batched Persistence**: Market price changes are persisted to disk in 5-minute intervals and on shutdown, significantly reducing disk I/O compared to per-transaction saving.
- **High-Speed Caching**: Implementation of $O(1)$ `MarketEntry` lookups to eliminate search overhead during high-frequency GUI refreshes.
- **Lightweight Rendering**: Refactored `StocksGUI` to minimize object allocation and sorting logic during its 1-second refresh cycle.
---
*(Release stabilized at v1.1.0)*
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" }