
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 co
9.0
Compatibility
Changes
๐งพ 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.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:8oLCKGgM:qptcv8wj"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:8oLCKGgM:qptcv8wj"
}
