Villager Trade Manager v12 - Advanced Minecraft Villager Economy Control (1.20.x-1.21.x Folia/Paper/Spigot)
Ultimate villager trade plugin: Custom pricing/bans, leveling, stock mgmt, wandering traders, dynamic economy, multi-DB (SQLite/PG/Supabase), AI help, Vault integration. Folia optimized.
🎯 Key Features
- 💰 Custom Trades: Price any trade/profession (
/vtrade setprice armorer diamond_helmet 25) - 🚫 Item Bans: Block OP items (
/vtrade banitem netherite_sword) - 📈 Leveling: XP progression, unlocks (
/vtrade level set) - 📦 Stock/Restock: Limits, auto-refill (
/vtrade stock inspect) - 🐪 Wanderers: Custom trades (
/vtrade wanderer add) - 🗄️ DBs: SQLite/PG/Supabase w/ pooling
- 🤖 AI Help:
/vtrade help ask "setup guide?" - 📊 Metrics: Health/prometheus
Keywords: minecraft villager trade plugin 1.21, custom villager trades paper, folia villager manager, spigot economy plugin.
📋 Commands Summary
| Cmd | Desc |
|---|---|
/vtrade setprice <prof> <item> <cost> |
Custom price |
/vtrade banitem <item> |
Ban item |
/vtrade level/stock [set/inspect] |
Level/stock mgmt |
/vtrade [addprereq/chain] <trade> |
Enhancements |
/vtrade wanderer add <item> |
Trader trades |
/vtrade restock [on/time] |
Restock |
/vtrade help ask <q> |
AI help |
⚙️ Config Highlights
database: sqlite # or postgresql/supabase
level_progression.enabled: true
trade_enhancements.enabled: true
ai_assistant.groq.api_key: "key"
Transform your villager economy today! ⭐ Download v12.
Changelog
[11.1.0] - 2025-11-06
🐛 Bug Fixes
Folia Compatibility Fix ⭐ CRITICAL
- Plugin Loading Failure: Fixed
UnsupportedOperationExceptionthat prevented plugin from loading on Folia 1.21.8 - Scheduler Compatibility: Replaced raw
Bukkit.getScheduler()calls with platform-awareTaskScheduler - PerformanceMonitorService: Updated to use
TaskScheduler.runAsyncRepeating()instead ofrunTaskTimerAsynchronously() - MigrationCommand: Updated to use
TaskScheduler.runSyncRepeating()instead ofrunTaskTimer() - Constructor Updates: Modified service constructors to accept
TaskSchedulerdependency injection
🔧 Technical Improvements
Dependency Injection
- TaskScheduler Injection: Services now properly receive
TaskSchedulerinstances instead of accessing raw schedulers - Platform Abstraction: Enhanced use of platform-aware scheduling throughout the codebase
- Code Consistency: Unified scheduler usage patterns across all components
[11.0.0] - 2025-11-06
🎉 Major Features
Item Banning System ⭐ NEW
- Complete Item Control: Ban entire items from appearing in any villager trades
- Smart Filtering: Automatically prevents enchanted variants when base item is banned
- Database Persistence: Banned items stored in database with audit trail
- Commands Added:
/vt banitem <item_type>- Ban items from all villager trades/vt unbanitem <item_type>- Remove item bans/vt listbanneditems- Display all currently banned items
- Examples:
/vt banitem diamond_sword,/vt banitem enchanted_golden_apple
PostgreSQL Database Support ⭐ NEW
- Direct JDBC Connections: Support for PostgreSQL databases beyond Supabase
- Connection String Config: Full PostgreSQL connection string support
- Enhanced Compatibility: Works with Supabase, AWS RDS, Google Cloud SQL, etc.
- Configuration:
database: type: "postgresql" postgresql: connectionString: "postgresql://user:password@host:5432/database"
🔧 Enhancements
Command System Improvements
- Enhanced Tab Completion: Full autocomplete for all commands and parameters
- Better Error Messages: Improved feedback for invalid commands and parameters
- Enchantment Guidance: Special help messages for enchantment-related commands
- Profession Validation: Real-time validation of profession names and trade IDs
Database Architecture
- Multi-Database Support: SQLite, Supabase REST API, PostgreSQL JDBC
- Automatic Fallback: Seamless fallback to SQLite if cloud databases fail
- Connection Management: Improved connection pooling and lifecycle management
- Schema Validation: Enhanced database schema validation and migration
Performance Optimizations
- Memory Usage: Reduced memory footprint for large trade registries
- Database Queries: Optimized query performance and caching
- Async Operations: Improved asynchronous database operations
- Resource Management: Better cleanup and resource disposal
🐛 Bug Fixes
Supabase Integration
- URL Construction: Fixed double
/rest/v1/path construction bug - Authentication: Corrected authorization header usage for service keys
- Connection Status: Fixed
isConnected()method to properly track status - Error Handling: Improved error messages and fallback behavior
Command Processing
- Trade Validation: Fixed validation logic for custom trade pricing
- Parameter Parsing: Improved command argument parsing and validation
- Tab Completion: Fixed tab completion for complex command structures
- Error Feedback: Enhanced error messages for user guidance
Database Operations
- Connection Handling: Fixed connection leak issues in database providers
- Transaction Management: Improved transaction handling and rollback
- Migration System: Enhanced database migration reliability
- Data Integrity: Better validation of database operations
🔒 Security
Database Security
- Connection Encryption: Proper SSL/TLS for database connections
- Credential Handling: Secure storage and transmission of credentials
- Access Control: Improved permission validation
- Audit Trail: Database operation logging for security monitoring
Input Validation
- Command Sanitization: Enhanced input validation for commands
- SQL Injection Prevention: Prepared statements for all database queries
- Path Traversal: Protection against path manipulation attacks
- Resource Limits: Rate limiting and resource usage controls
🏗️ Technical Improvements
Code Architecture
- Database Provider Pattern: Clean abstraction for different database types
- Configuration System: Enhanced configuration parsing and validation
- Error Handling: Comprehensive exception handling and logging
- Code Organization: Better separation of concerns and modularity
Dependencies
- PostgreSQL Driver: Added PostgreSQL JDBC driver support
- HTTP Client: Updated OkHttp for better Supabase communication
- JSON Processing: Enhanced Jackson for complex data structures
- Testing Framework: Improved unit and integration testing
Build System
- Maven Configuration: Updated dependencies and build process
- Plugin Compatibility: Enhanced compatibility with different server platforms
- Resource Management: Better handling of plugin resources
- Deployment: Streamlined build and deployment process
🔄 Migration Guide
From V10.x to V11.0
Database Migration
# V10.x config
database:
type: "sqlite"
# V11.0 config (unchanged for SQLite users)
database:
type: "sqlite"
sqlite:
file: "villager_data.db"
New Commands Available
- Run
/vt listbanneditemsto see current banned items (none by default) - Use
/vt banitem <item>to ban items from trades - Consider
/vt setpriceimprovements with better error messages
Configuration Changes
- No breaking changes for existing configurations
- New
postgresqlsection available for advanced users - Enhanced logging options in
config.yml
📊 Metrics & Monitoring
Health Checks
- HTTP Endpoints: Configurable health check endpoints
- Database Monitoring: Connection pool and query performance metrics
- Memory Tracking: JVM memory usage and garbage collection monitoring
- Trade Statistics: Real-time trade volume and performance analytics
Logging Improvements
- Structured Logging: JSON-formatted logs for better parsing
- Debug Modes: Enhanced debugging options for troubleshooting
- Performance Logs: Query execution time and bottleneck identification
- Error Tracking: Comprehensive error reporting and analysis
[10.x.x] - Previous Versions
See individual release notes for V10.x changes including:
- Universal trade pricing for all professions
- Folia compatibility and region-threaded scheduling
- Advanced restock system with instant restock
- Dynamic trade detection and storage
🤝 Contributing
- Bug Reports: Use GitHub Issues with detailed reproduction steps
- Feature Requests: Describe the use case and expected behavior
- Code Contributions: Follow the existing code style and patterns
- Testing: Ensure all tests pass and add new tests for new features
📞 Support
- Documentation: README.md for complete usage guide
- Issues: GitHub Issues for bug reports and feature requests
- Community: Join our Discord for community support
- Compatibility: Minecraft 1.20.x - 1.21.x, Java 17+
Legend:
- 🎉 Major Features: Significant new functionality
- 🔧 Enhancements: Improvements to existing features
- 🐛 Bug Fixes: Resolved issues and problems
- 📚 Documentation: Documentation and guides
- 🔒 Security: Security-related changes
- 🏗️ Technical: Internal architecture changes
Changelog
[11.0.0] - 2025-11-06
🎉 Major Features
Item Banning System ⭐ NEW
- Complete Item Control: Ban entire items from appearing in any villager trades
- Smart Filtering: Automatically prevents enchanted variants when base item is banned
- Database Persistence: Banned items stored in database with audit trail
- Commands Added:
/vt banitem <item_type>- Ban items from all villager trades/vt unbanitem <item_type>- Remove item bans/vt listbanneditems- Display all currently banned items
- Examples:
/vt banitem diamond_sword,/vt banitem enchanted_golden_apple
PostgreSQL Database Support ⭐ NEW
- Direct JDBC Connections: Support for PostgreSQL databases beyond Supabase
- Connection String Config: Full PostgreSQL connection string support
- Enhanced Compatibility: Works with Supabase, AWS RDS, Google Cloud SQL, etc.
- Configuration:
database: type: "postgresql" postgresql: connectionString: "postgresql://user:password@host:5432/database"
🔧 Enhancements
Command System Improvements
- Enhanced Tab Completion: Full autocomplete for all commands and parameters
- Better Error Messages: Improved feedback for invalid commands and parameters
- Enchantment Guidance: Special help messages for enchantment-related commands
- Profession Validation: Real-time validation of profession names and trade IDs
Database Architecture
- Multi-Database Support: SQLite, Supabase REST API, PostgreSQL JDBC
- Automatic Fallback: Seamless fallback to SQLite if cloud databases fail
- Connection Management: Improved connection pooling and lifecycle management
- Schema Validation: Enhanced database schema validation and migration
Performance Optimizations
- Memory Usage: Reduced memory footprint for large trade registries
- Database Queries: Optimized query performance and caching
- Async Operations: Improved asynchronous database operations
- Resource Management: Better cleanup and resource disposal
🐛 Bug Fixes
Supabase Integration
- URL Construction: Fixed double
/rest/v1/path construction bug - Authentication: Corrected authorization header usage for service keys
- Connection Status: Fixed
isConnected()method to properly track status - Error Handling: Improved error messages and fallback behavior
Command Processing
- Trade Validation: Fixed validation logic for custom trade pricing
- Parameter Parsing: Improved command argument parsing and validation
- Tab Completion: Fixed tab completion for complex command structures
- Error Feedback: Enhanced error messages for user guidance
Database Operations
- Connection Handling: Fixed connection leak issues in database providers
- Transaction Management: Improved transaction handling and rollback
- Migration System: Enhanced database migration reliability
- Data Integrity: Better validation of database operations
🔒 Security
Database Security
- Connection Encryption: Proper SSL/TLS for database connections
- Credential Handling: Secure storage and transmission of credentials
- Access Control: Improved permission validation
- Audit Trail: Database operation logging for security monitoring
Input Validation
- Command Sanitization: Enhanced input validation for commands
- SQL Injection Prevention: Prepared statements for all database queries
- Path Traversal: Protection against path manipulation attacks
- Resource Limits: Rate limiting and resource usage controls
🏗️ Technical Improvements
Code Architecture
- Database Provider Pattern: Clean abstraction for different database types
- Configuration System: Enhanced configuration parsing and validation
- Error Handling: Comprehensive exception handling and logging
- Code Organization: Better separation of concerns and modularity
Dependencies
- PostgreSQL Driver: Added PostgreSQL JDBC driver support
- HTTP Client: Updated OkHttp for better Supabase communication
- JSON Processing: Enhanced Jackson for complex data structures
- Testing Framework: Improved unit and integration testing
Build System
- Maven Configuration: Updated dependencies and build process
- Plugin Compatibility: Enhanced compatibility with different server platforms
- Resource Management: Better handling of plugin resources
- Deployment: Streamlined build and deployment process
🔄 Migration Guide
From V10.x to V11.0
Database Migration
# V10.x config
database:
type: "sqlite"
# V11.0 config (unchanged for SQLite users)
database:
type: "sqlite"
sqlite:
file: "villager_data.db"
New Commands Available
- Run
/vt listbanneditemsto see current banned items (none by default) - Use
/vt banitem <item>to ban items from trades - Consider
/vt setpriceimprovements with better error messages
Configuration Changes
- No breaking changes for existing configurations
- New
postgresqlsection available for advanced users - Enhanced logging options in
config.yml
📊 Metrics & Monitoring
Health Checks
- HTTP Endpoints: Configurable health check endpoints
- Database Monitoring: Connection pool and query performance metrics
- Memory Tracking: JVM memory usage and garbage collection monitoring
- Trade Statistics: Real-time trade volume and performance analytics
Logging Improvements
- Structured Logging: JSON-formatted logs for better parsing
- Debug Modes: Enhanced debugging options for troubleshooting
- Performance Logs: Query execution time and bottleneck identification
- Error Tracking: Comprehensive error reporting and analysis
[10.x.x] - Previous Versions
See individual release notes for V10.x changes including:
- Universal trade pricing for all professions
- Folia compatibility and region-threaded scheduling
- Advanced restock system with instant restock
- Dynamic trade detection and storage
🤝 Contributing
- Bug Reports: Use GitHub Issues with detailed reproduction steps
- Feature Requests: Describe the use case and expected behavior
- Code Contributions: Follow the existing code style and patterns
- Testing: Ensure all tests pass and add new tests for new features
📞 Support
- Documentation: README.md for complete usage guide
- Issues: GitHub Issues for bug reports and feature requests
- Community: Join our Discord for community support
- Compatibility: Minecraft 1.20.x - 1.21.x, Java 17+
Legend:
- 🎉 Major Features: Significant new functionality
- 🔧 Enhancements: Improvements to existing features
- 🐛 Bug Fixes: Resolved issues and problems
- 📚 Documentation: Documentation and guides
- 🔒 Security: Security-related changes
- 🏗️ Technical: Internal architecture changes
Minor Bug Fixes
- Fixed Access global region thread To specific region thread In Folia Compatibility
- Other Minor Bug Fixes
Minecraft Villager Trade Manager — Version 10.0
“Instant Restock Update”
🚀 Key Features Implemented
1. Instant Restock System
- ✅ Added
instantRestockEnabledboolean flag for instant restocks. - ✅ New command:
/villagertrade instantrestock on/off. - ✅ Villager trades automatically replenish immediately after use.
- ✅ Platform-safe execution: Folia uses region-threaded scheduling; other platforms use synchronous execution.
2. Database Integration
- ✅ Instant restock setting persisted in SQLite
settingstable. - ✅ Automatic loading and saving of
instantRestockEnabled. - ✅ Fully backward compatible with existing database schema.
3. Enhanced Status Display
- ✅
/villagertrade statusnow shows Instant Restock status. - ✅ Clear On/Off indication for administrators.
4. Smart Integration
- ✅ Instant restock takes precedence over interval-based restocks.
- ✅ Normal restock system skips processing while instant restock is enabled.
- ✅ Seamless integration with existing restock features (
restocktime,restocklimit,unlimitedrestock).
5. Command System Updates
- ✅ Added
instantrestocksubcommand. - ✅ Updated usage help text to include new command.
- ✅ Tab completion for
on/offvalues. - ✅ Updated main command usage message to reflect new options.
6. Performance Optimizations
- ✅ Efficient instant restock processing with minimal CPU overhead.
- ✅ Minimal performance impact when feature is disabled.
- ✅ Platform-appropriate scheduling for optimal performance on Folia and legacy servers.
🧩 Compatibility
- Fully compatible with: Folia, Paper, Purpur, Spigot, Bukkit
- Minecraft versions: 1.20.x – 1.21.x
- Java: 17+
⚙️ Migration Notes
- Upgrade from v9.0 is seamless.
- Existing settings, prices, and restock data are preserved.
- No server restart required for migration.
📌 Summary
v10.0 introduces Instant Restock, giving server admins full control to replenish villager trades immediately, while maintaining compatibility, thread safety, and performance across all supported platforms.
🧾 Minecraft Villager Trade Manager v9.0
The Folia Expansion Update
🚀 Major Features
Folia Native Compatibility
- Full Region-Threaded Support: Native compatibility with Folia’s region-based concurrency model.
- Automatic Platform Detection: Detects Folia, Paper, Purpur, Spigot, and Bukkit automatically.
- Seamless Integration: Works transparently without configuration changes.
- Backward Compatibility: 100% retained functionality on all legacy platforms.
Advanced Scheduler Abstraction
- Unified TaskScheduler Interface: Single abstraction for scheduling tasks across all supported servers.
- FoliaScheduler Implementation: Region-threaded scheduling using Folia’s APIs.
- BukkitSchedulerWrapper: Legacy scheduler for Paper, Spigot, Purpur, and Bukkit.
- Entity & Location Safe: All entity and location operations respect Folia’s thread-safety rules.
Asynchronous Database Operations
- Thread-Safe Database Executor: Dedicated async thread pool for SQLite operations.
- Non-Blocking I/O: Prevents main-thread lag by running all DB tasks asynchronously.
- Configurable Thread Pool: Adjust thread count for optimal performance.
- Graceful Shutdown: Automatic cleanup of async resources.
🛠️ Technical Improvements
Platform Detection Service
- Automatic Recognition: Detects server platform at runtime.
- Adaptive Behavior: Adjusts scheduler and async methods accordingly.
- Detailed Logging: Shows platform information on startup.
- Safe Fallbacks: Gracefully handles missing APIs on unsupported versions.
Thread Safety Enhancements
- Region-Safe Entity Access: All villager actions use Folia-safe execution.
- Concurrent Data Access: Thread-safe operations for restock and trade data.
- Cross-Platform API Safety: Reflection-based compatibility layer.
- Improved Exception Handling: Safe and recoverable async operations.
Performance Optimizations
- Reduced Main Thread Load: All blocking tasks moved to async.
- Efficient Resource Management: Improved thread pooling and connection handling.
- Memory Optimization: Low-overhead caching mechanisms.
- Optimized Scheduling: Best scheduling method automatically selected per platform.
🔄 Compatibility Enhancements
Multi-Platform Support
- ✅ Folia (1.20.x–1.21.x)
- ✅ Paper (1.20.x–1.21.x)
- ✅ Purpur (1.20.x–1.21.x)
- ✅ Spigot (1.20.x–1.21.x)
- ✅ Bukkit (1.20.x–1.21.x)
Version Range
- Minecraft: 1.20.x – 1.21.x
- Java: 17+
API Integration
- Reflection-Based Access: Ensures compatibility across API variants.
- Graceful Fallbacks: Automatically uses the best available scheduler.
- Future-Proof Design: Modular structure ensures easy updates.
📊 System Architecture
Modular Design
- Scheduler Layer: Unified async/sync scheduling.
- Platform Layer: Detection & adaptation services.
- Database Layer: Async persistent storage.
- Business Logic Layer: Core villager trade management.
Resource Management
- Thread Pool Management: Configurable async threads.
- Connection Handling: Automatic open/close cycle for DB connections.
- Memory Optimization: Efficient caching and cleanup.
- Safe Shutdown: Proper termination of all async tasks.
🎯 Feature Preservation
All features from v8.0 are maintained and improved:
- Custom Trade Pricing
- Discount Prevention
- Custom Restock System (intervals, limits, unlimited)
- Command Suite (
/villagertrade setprice,/villagertrade restock, etc.) - SQLite Persistent Data Storage
Enhanced Reliability
- Better error recovery
- Strong data consistency
- Improved async logging
📈 Performance Benefits
Scalability
- Supports servers with 1000+ villagers
- <1% tick usage even under high load
- Fully async database and trade logic
Operational Efficiency
- Fast startup
- No blocking on main thread
- Safe async resource cleanup
🔧 Implementation Details
New Components
TaskSchedulerInterfaceFoliaScheduler(region-threaded scheduler)BukkitSchedulerWrapper(legacy scheduler)PlatformService(detection and adaptation)AsyncDatabaseExecutor(thread-safe DB layer)
Codebase Improvements
- Modularized architecture
- Full backward compatibility
- Comprehensive inline documentation
- Future-ready design
📋 Migration Notes
- Seamless Upgrade: Drop-in replacement, no config changes.
- Data Preservation: Existing settings and prices remain intact.
- Command Compatibility: No breaking command changes.
- Zero Downtime: Upgrade from v8.0 without restart issues.
✅ Summary
Minecraft Villager Trade Manager v9.0 – The Folia Expansion Update
Now supports Folia’s region-threaded architecture while maintaining full compatibility with Paper, Purpur, Spigot, and Bukkit.
Bringing safe async performance, universal scheduling, and next-level stability to villager trade management.
🔁 New in v8.0 — The Restock Update
⚙️ Custom Restock System
Take command of villager restocking behavior with full flexibility:
/villagertrade restock on/off— Enable or disable the custom restock system./villagertrade restocktime <minutes>— Set the restock interval (default: 30 minutes)./villagertrade restocklimit <count>— Set the daily restock limit (default: 5 restocks/day)./villagertrade unlimitedrestock on/off— Toggle unlimited villager restocks.
✅ Fully compatible with all villager professions and levels.
✅ Automatically resets restock counts daily.
✅ Smart, lightweight system monitored every minute.
🧩 Database Integration
- SQLite-based persistent storage for all settings and restock data.
- Includes two new tables:
settings— Saves custom configuration values.villager_restock_data— Tracks each villager’s individual restock usage.
- Thread-safe operations using
ConcurrentHashMap.
📊 Enhanced Status Display
/villagertrade status now shows:
- Restock system status (enabled/disabled).
- Current restock interval and daily limits.
- Unlimited restock toggle state.
- Price system status and stored price configurations.
Minecraft Villager Trade Manager
Complete control over villager trading economics with custom pricing and discount prevention
Minecraft Villager Trade Manager is a comprehensive Paper/Spigot plugin that gives server administrators complete control over villager trading economics. Take control of trade prices, eliminate exploitative discounts, and create a fair, balanced trading experience for all players.
🎯 Features
Complete Trade Control
- Set custom prices for any villager trade, especially enchanted books
- Lock in fixed prices that never change regardless of player reputation
- Prevent all forms of trade manipulation and exploitation
Discount Prevention System
- Eliminate Hero of the Village effects and free gifts
- Remove reputation-based trade discounts
- Prevent price inflation from overused trades
- Maintain static pricing across all trading scenarios
Custom Pricing Engine
- Set specific emerald costs for enchanted books (Fortune, Efficiency, Protection, etc.)
- Configure prices for any enchantment level (Fortune I, Fortune II, Fortune III)
- Automatic price capping at 64 emeralds per trade
- Consistent 1-book cost for all enchanted book trades
Universal Compatibility
- Works with Minecraft versions 1.20.x through 1.21.x
- Compatible with Paper and Spigot server implementations
- Automatic adaptation to server capabilities
- No conflicts with other plugins
User-Friendly Management
- Simple command system:
/villagertrade setprice <enchant> <level> <price> - Intelligent tab completion for all enchantments and levels
- Real-time status monitoring and price management
- Persistent storage with automatic data saving
🚀 Installation
- Download the latest release from the Releases page
- Place the
.jarfile in your server'spluginsfolder - Restart your server
- The plugin will automatically create its configuration files
🎮 Commands
| Command | Description | Permission |
|---|---|---|
/villagertrade on |
Enable trade management system | villagertrade.manage |
/villagertrade off |
Disable trade management system | villagertrade.manage |
/villagertrade status |
View current custom prices and system status | villagertrade.manage |
/villagertrade setprice <enchant> <level> <price> |
Set custom prices for trades | villagertrade.manage |
Command Examples
# Set Efficiency I to cost 20 emeralds
/villagertrade setprice efficiency 1 20
# Set Protection IV to cost 35 emeralds
/villagertrade setprice protection 4 35
# Set Mending to cost 50 emeralds
/villagertrade setprice mending 1 50
# Set Fortune III to cost 40 emeralds
/villagertrade setprice fortune 3 40
Version 6.0 - Multi-Version Compatibility Release
⚡ Major Features Cross-Version Compatibility: Now supports Minecraft versions 1.20.x through 1.21.x
Graceful Degradation: Automatically adapts to available server features
Version Detection System: Intelligently detects server capabilities at runtime
🛠️ Technical Improvements
API Version Independence: No longer tied to specific Minecraft version APIs
Reflection-Based Compatibility: Uses reflection for version-specific method calls
Fallback Implementations: Provides backup methods for older server versions
Feature Detection: Dynamically checks for Hero of the Village and Raid events
🔄 Compatibility Enhancements 1.20.x Support: Full compatibility with all 1.20.x versions
1.21.x Support: Maintained compatibility with 1.21.x versions
Paper/Spigot: Works with both Paper and Spigot server implementations
Backward Compatibility: Maintains all existing functionality across versions
🐛 Bug Fixes
Method Compatibility: Fixed NoSuchMethodError exceptions on older versions
Event Handling: Conditional event processing based on server capabilities
Entity Processing: Version-safe entity distance calculations
Potion Effects: Reflection-based potion effect removal for older versions
Version 5.0 - User Experience Improvements
🎯 Command System Overhaul
Simplified Syntax: /nodiscounts setprice <enchant> <level> <price>
Natural Language Commands: efficiency 1 instead of enchanted_book_efficiency_1
Intelligent Tab Completion: Context-aware suggestions for all parameters
💰 Trading System Refinements
Consistent Book Costs: Exactly 1 book per enchanted book trade
Price Capping: Maximum 64 emeralds per trade (respects Minecraft stack limits)
Dynamic Level Limits: Tab completion shows correct max levels for each enchantment
📝 User Interface Improvements
Clear Error Messages: Helpful feedback for invalid commands
Better Status Display: User-friendly format for custom prices
Enhanced Help System: More examples and clearer usage instructions
Removed SQLite Dependency: Completely removed SQLite and replaced it with Java's built-in serialization
File-based Storage: Custom prices are now saved to plugins/NoDiscounts/prices.dat using Java serialization
ConcurrentHashMap: Used ConcurrentHashMap for thread-safe operations
No External Libraries: Eliminated all external SQLite dependencies that were causing conflicts
Simplified Persistence: Uses simple file I/O with object serialization instead of database operations
1 No Library Conflicts: Eliminates the SQLite library conflict with other plugins
2 Lightweight: No external dependencies beyond what's built into Java
Updated Sqlite Driver to 3.43.0.0
Changelog New Features
SQLite Database Integration: Custom trade prices are now stored in a persistent SQLite database (plugins/NoDiscounts/prices.db) instead of config files.
Full Enchantment Support: Added support for all enchantments, including modded ones.
Dynamic Tab Completion: Command tab completion now auto-suggests every enchantment and level combination available.
Enhanced Persistence: Custom prices survive restarts with robust database storage.
Improvements
Error Handling: Fixed ConcurrentModificationException in tab completion.
Performance: Optimized database operations and memory usage.
Compatibility: Works with all enchantments, vanilla and modded.
User Experience: Expanded command help with examples and formatting guides.
Technical Changes
Database Structure: Prices saved in custom_prices table (item_key, price).
File Location: Database auto-created at plugins/NoDiscounts/prices.db.
API Updates: Updated for Minecraft 1.21.4 (Paper/Spigot).
Memory Management: Fixed concurrent modification issues during tab completion.
Features
Disables All Villager Discounts (zombie curing, reputation, Hero of the Village).
Static Trade Prices (overused trades never inflate).
Preserves Villager Progression (leveling, unlocking trades, and refreshing).
Hero of the Village Removal (no free gifts).
Custom Pricing System
Set custom emerald prices for any enchanted book using this format:
enchanted_book_sharpness_5 → Sharpness V
enchanted_book_protection_4 → Protection IV
enchanted_book_mending_1 → Mending I
Data persists permanently in SQLite.
Commands
/nodiscounts on — Enable discount prevention
/nodiscounts off — Disable discount prevention
/nodiscounts status — Check plugin status + view custom prices
/nodiscounts setprice <item_key> <price> — Set a custom price
Database Info
Location: plugins/NoDiscounts/prices.db
Table: custom_prices (item_key TEXT PRIMARY KEY, price INTEGER)
Auto-created on first run.
Examples
/nodiscounts setprice enchanted_book_sharpness_5 40
/nodiscounts setprice enchanted_book_protection_4 35
/nodiscounts setprice enchanted_book_mending_1 50
/nodiscounts status



