
Genius-Shop
Data-driven economy shop for Paper/Spigot with GUI menus, Vault, dynamic pricing, stock limits/resets, permissions, bulk sell, localization, and a built-in web editor.
Список изменений
Version 1.6.0-BETA
Beta Release Notice
Genius-Shop 1.6.0 is currently in beta and is not considered a stable production release.
This version contains several major new systems and significant changes to pricing, transactions, item conditions, campaigns, variants, database management, and the web editor. Although the update has been tested, bugs, compatibility issues, and unexpected behavior may still occur.
Please test this version in a development or staging environment before using it on a production server. Make a backup of your plugin files and database before updating.
Feedback is needed before the full 1.6.0 release. Please report:
- Bugs and error messages
- Pricing or transaction issues
- Web editor problems
- Compatibility problems
- Confusing configuration options
- Missing functionality or usability improvements
When reporting an issue, include your server version, plugin version, relevant configuration, reproduction steps, and the
plugins/Genius-Shop/debug/error.logfile when available.The stable 1.6.0 release will be published after the beta has received sufficient testing and the reported issues have been addressed.
Added
- Per-item price mode toggles:
buy-price-per-item(trueby default)sell-price-per-item(trueby default)
- Debug error file logging for support diagnostics:
- Added error/exception-only file logger integrated with debug mode.
- Added config section:
debug-error-log.enableddebug-error-log.file
- Default log output path:
plugins/Genius-Shop/debug/error.log(inside plugin data folder). - Logger now captures:
ConsoleLog.error(...)andConsoleLog.apiError(...)- Plugin
SEVERElogger events (including thrown exceptions) - Previously raw stack traces in key exception paths (migration/webhook/YAML load/reload/shutdown save)
- Intended support flow: share
debug/error.logwith support for deeper analysis.
- Support for pricing per configured item amount:
- Buy/sell totals can now be either
price * quantityorprice * (selectedAmount / configuredAmount).
- Buy/sell totals can now be either
- Web editor support:
- New item fields for Buy Price Mode and Sell Price Mode.
- YAML parse/export support for the new pricing mode fields.
- Added
Clone to Shopaction in item modal (copies item to another shop file with auto slot assignment). - Updated clone target selection UX:
Clone to Shopnow uses a floating single-select picker above the item modal (searchable, scrollable list).Clone to Multiplenow uses a floating multi-select picker above the item modal (searchable, scrollable list).
- Added
Clone to Multipleaction in item modal (bulk clone to comma-separated shops orall). - Added
Import Itemsaction for current shop:- Supports JSON and YAML file uploads.
- Appends imported items with auto ID assignment.
- Optional keep-provided-slot behavior when target slot is free.
- Added export tools:
Export Itemaction in item modal (JSON).Exportaction in Shop tab for current shop (YAML/JSON) and current project (JSON).
- Added menu import/export tools (JSON):
- Main Menu
- Purchase Menu
- Sell Menu
- Added YAML support for menu import/export (Main Menu, Purchase, Sell).
- Menu import now supports file upload (JSON/YAML) instead of paste-only input.
- File import format is now auto-detected (JSON vs YAML) from file name/content, with manual selection as fallback.
- Added Shop preview parity mode toggle (
PARITY: ON/OFF) to switch between:- Simplified tooltip preview.
- Lore-format parity preview that expands GUI lore tokens (
%price-line%,%custom-lore%,%global-limit%,%player-limit%,%stock-reset-timer%, hints, and spawner/potion lines).
- Added parity toggle buttons to Main Menu, Purchase, and Sell tabs.
- Web editor item modal live preview:
- Added a side preview box next to the item edit modal.
- Preview updates live as fields are edited (material, name, amount, prices, lore).
- Preview now includes advanced item data:
- Enchantments
- Commands +
run-as+run-command-only - Limits (player/global)
- Dynamic pricing summary
- Permission/flags/stock reset indicators
- Added preview visibility toggle (show/hide) in the modal.
- Added a persistent preview toggle button in the modal form area, so preview can always be shown again after hiding.
- Grouped modal checkboxes into titled sections for clearer organization.
- Economy safety guards (server-side):
- Max transaction value guard (
economy-safety.max-transaction-value). - Anti-spike pricing rules (
economy-safety.anti-spike.*) for base-multiplier and step-change protection. - Per-action cooldowns (
economy-safety.cooldowns.*) for buy/sell/bulk-sell. - Optional large-purchase double-confirm flow (
economy-safety.large-purchase-confirmation.*). - Safer economy operations with explicit Vault response/error handling and refund attempt on post-withdraw purchase failures.
- Added strict invalid-value checks before transactions (NaN, Infinity, negative, hard-cap overflow-ish values).
- Added server-side unit floor/ceiling enforcement against configured min/max bounds for final resolved prices.
- Added explicit fail-safe handling for withdraw/deposit failures with player-facing error messaging and guarded flow ordering.
- Added audit logging for guarded/economy failures including reason, shop key, item key/material, player, and total.
- Added optional in-game admin alerting for guard/economy failures with configurable permission and rate-limiting:
economy-safety.admin-alerts.enabledeconomy-safety.admin-alerts.notify-permissioneconomy-safety.admin-alerts.rate-limit-ms
- Max transaction value guard (
- New dry-run validation command:
/shop validate-prices- Scans all loaded shop items and reports risky/invalid price configurations without changing data.
- Web editor economy safety controls:
- Added GUI Settings panel for
economy-safety.*status and values. - Added presets:
STRICT,BALANCED,OFF. - Added save integration via dedicated API endpoint (
/api/economy-safety).
- Added GUI Settings panel for
- Added regression tests for transaction safety guard behavior:
- Invalid money value rejection
- Server-side min/max floor-ceiling enforcement
- Anti-spike step-change blocking
- Large purchase two-step confirmation flow
- Advanced item conditions (mid-size feature):
- Added server-side condition checks for:
min-player-levelmax-player-levelrequired-gamemodeallowed-worldsdenied-worlds
- Conditions are enforced in:
- Shop item visibility/opening
- Buy flow
- Sell flow
- Bulk sell matching
- Added web editor fields + YAML parse/export support for these condition keys.
- Added server-side condition checks for:
- Scheduled campaigns (mid-size feature):
- Added item-level campaign window keys:
campaign-enabledcampaign-namecampaign-startcampaign-endcampaign-timezonecampaign-buy-multipliercampaign-sell-multiplier
- Campaign multipliers are applied to live buy/sell prices in:
- Shop GUI display pricing
- Purchase flow
- Sell flow
- Bulk sell flow
- Best-sell item matching
- Web editor now supports campaign fields in item modal and YAML parse/export.
- Added item-level campaign window keys:
- Stock analytics (mid-size feature, basic dashboard first):
- Added new web editor
STOCKtab dashboard. - Added backend API endpoint:
GET /api/stock-analytics. - Dashboard includes:
- Global summary cards (tracked items, out-of-stock, low-stock, fill percentage).
- Shop filter dropdown.
- Item stock table for stock-limited items (
global-limit > 0) with current/limit/remaining/status.
- Data is aggregated from live shop items + SQLite global stock counts (
global_countsindata.db).
- Added new web editor
- data.db web editor (mid-size feature):
- Added new web editor
DATAtab for direct SQLite data management. - Added backend API endpoints:
GET /api/database(read grouped DB rows)POST /api/database(upsert DB row)DELETE /api/database(delete DB row)
- UI includes easy-to-understand grouped sections:
Player Counts(player_counts) for per-player limitsGlobal Counts(global_counts) for shared stock countersStock Resets(stock_resets) for last-run reset tracking
- Added row-level actions in the web UI:
ADD ROWSAVEDELETEREFRESH
- Added readable timestamp display for stock reset
last_runvalues and decoded reset id display.
- Added new web editor
- Price formula rules (larger system, first phase):
- Added per-item formula keys:
buy-price-formulasell-price-formula
- Added safe server-side formula evaluator (
+,-,*,/, parentheses, unary+/-, functionsmin,max,abs,round,floor,ceil,pow). - Formula variables:
base,price,dynamic,dynamic_priceglobal_count,countamount,price_changemin_price,max_pricelimit,global_limit
- Integrated formula-based pricing into:
- Shop GUI display prices
- Purchase flow
- Sell flow
- Bulk sell flow
- Best-sell matching
- Public API price lookups
- Web editor support added:
- Item modal fields for Buy Price Formula / Sell Price Formula
- YAML parse/export support for formula keys
- Added per-item formula keys:
- Item variants (larger system, phase 1):
- Added stable variant identity support in shop item loading:
variant-keyitem-key
- Added
variantsexpansion in shop loading:- Variant entries inherit base item settings.
- Variant values override inherited values.
- Variants are materialized as separate runtime
ShopItementries.
- Runtime unique keys now include
variant-keyto avoid stock/limit/dynamic-pricing key collisions. - Added optional grouped variant selector menu:
- Set
variant-menu: trueon a base item withvariantsto show one main-slot entry. - Clicking the entry opens a variant selection inventory for buy/sell.
- Set
- Web editor support added:
- Item modal fields for
item-keyandvariant-key. - YAML parse/export support for
item-keyandvariant-key. - Shop item list badges for item/variant keys.
- Item modal fields for
- Added stable variant identity support in shop item loading:
- Server-side audit + rollback:
- Web editor file actions are now audited server-side in
activity-log.json. - Audit entries are automatically written for:
- File create/update saves
- File deletions
- Rollback operations
- Added API rollback endpoint:
POST /api/activity-log/rollbackwith activity entry id
- Added API clear endpoint:
POST /api/activity-log/clear
- Web editor history modal now reads from server audit data and performs server-side rollback.
- Web editor file actions are now audited server-side in
Changed
- Buy and sell total calculations now respect each item's selected pricing mode.
- Bulk sell total calculation now respects the sell pricing mode.
- Shop item lore price lines now show totals for the configured item amount (for both per-item and per-configured-amount modes).
- Buy/Sell menu lore now resolves stock placeholders in item/custom lore paths:
%global-limit%%player-limit%%limit%%stock-reset-timer%
- Transaction guard pricing checks now treat formula-driven item pricing as dynamic guard input where applicable.
