Fixed critical bug where orders would get stuck on the last item due to floating-point precision errors in escrow payments. Orders now complete reliably.
Fixed critical delivery bugs including first-time delivery failures and OrderItem ID issues. Added webhook and automatic data validation/repair.
JAR size reduced by 48% (18.2 MB → 9.5 MB) through smart dependency minimization and native library exclusions. Faster downloads, better performance, same functionality.
Visual collection cart display, Drop All Items feature, and improved collection handling for all quantity scenarios. Better UX for order owners collecting delivered items.
New Take All button for quick deliveries, Stop Order feature for order management, and critical fix for first delivery failures. Improved item stacking and better error handling.
Enhanced ItemsAdder integration with custom item name display, new search command, dimension-based filtering for addons. Full backward compatibility.
SigmaOrders v1.0.2 - Changelog
NEW FEATURES
Search Functionality
- Added /orders search <query> command to search orders by item name
- Search is case-insensitive and supports partial matches
- Search results persist when navigating order details and returning
- GUI title displays active search query: "Orders (Search: <query>)"
- Full ItemsAdder custom item name support in search
Professional Order Sorter
- Price (High to Low)
- Added advanced sorting system to /orders GUI
- Sort options available via hopper button (slot 47):
- Price (Low to High)
- Date (Newest First)
- Date (Oldest First)
- Item Names (Alphabetical)
- Left-click to cycle through sort options
- Right-click to reverse current sort
- Sort button displays all options with active one highlighted
- Sort preferences saved per player
- No chat spam - sorting happens silently
ItemsAdder Custom Item Support
- Order announcements (hover tooltip)
- Full support for ItemsAdder custom items throughout the plugin
- Custom item display names shown in:
- All GUIs (Orders, Order Details, Delivery, My Orders, Admin Orders)
- Collection messages
- Search results
- Uses ItemsAdder API to retrieve actual custom item names
- Falls back to formatted material name if ItemsAdder unavailable
Automatic System Order Cleanup
- System orders (created by addons with UUID 0,0) are automatically collected when fully delivered
- Prevents database data accumulation from uncollected addon orders
- Works automatically - no manual intervention required
- Orders are auto-deleted after collection to save storage
BUG FIXES
Critical Delivery Fixes
- Fixed double item return bug: When delivering excess items (e.g., 64 diamonds for 30 needed), excess items are now returned BEFORE delivery attempt. If delivery fails, only the consumed items are returned, preventing duplication.
- Fixed first-attempt delivery failures: Resolved race condition where deliveries failed on first attempt but succeeded on second. Now reads delivered count directly from database within transaction for accurate optimistic locking.
GUI Improvements
- Fixed item dragging: Items can no longer be dragged out of search result GUIs
- Fixed back button navigation: Back button from order details now correctly returns to search results (if applicable) instead of global orders list
- Fixed GUI title detection: Properly detects both normal orders GUI and search results GUI
Sorting Fixes
- Fixed reversed sorting: "Price (High to Low)" and "Date (Newest First)" now sort correctly
- Corrected comparator logic to ensure proper sort order
UI/UX IMPROVEMENTS
Removed Annoying Messages
- Removed warning message: "Note: This item has custom data. Make sure it matches what the order requires!" during order fulfillment
- Sort changes no longer spam chat - sorting happens silently in GUI
Enhanced GUI Display
- All item names now use ItemsAdder custom names when available
- Consistent item name display across all GUIs and messages
- Better visual feedback in sort button (shows all options with active highlighted)
TECHNICAL IMPROVEMENTS
Database & Performance
- Improved transaction handling with explicit auto-commit management
- Optimistic locking now uses database values instead of potentially stale cache
- Better error handling and rollback logic
- Conditional debug logging (respects /orders debug off)
Code Quality
- Refactored item return logic to prevent duplication
- Improved variable scoping for lambda expressions
- Better separation of concerns in delivery processing
- Enhanced error messages and logging
API CHANGES
New Methods
- ItemUtils.getItemDisplayName(SigmaOrders plugin, OrderItem orderItem) - Get display name with ItemsAdder support
- ItemUtils.getItemDisplayName(SigmaOrders plugin, ItemStack itemStack) - Get display name from ItemStack
- OrderManager.isSystemOrder(Order order) - Check if order is system order (internal)
- OrderManager.autoCollectSystemOrder(Connection conn, Order order) - Auto-collect system orders (internal)
Updated Methods
- MessageUtils.createOrderAnnouncement() - Now accepts OrderItem instead of just Material for ItemsAdder support
BACKWARD COMPATIBILITY
- All changes are backward compatible
- Existing orders continue to work normally
- No database migrations required
- Old API methods still work (with deprecation warnings where applicable)
NOTES
- System order auto-collection only affects orders created by addons (UUID 0,0)
- Player orders are unaffected and work as before
- Search functionality works with both vanilla and ItemsAdder items
- Sort preferences are per-player and persist during session
