Language

Minecraft Villager Trade Manager

Minecraft Villager Trade Manager

Modrinth

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

1.6k downloads 9 followers updated 4mo ago
latest v12.2 Modrinth
Bukkit Folia Paper Purpur Spigot 1.20 – 1.21.11 EconomyGame-mechanicsMobs

Minecraft Villager Trade Manager V12.0 - Complete Villager Economy Control

Paper
Spigot
Purpur
Bukkit
Folia
License: MIT
Java 21+

Ultimate Minecraft villager trade management plugin - Control every aspect of villager trading economics with advanced features like item banning, custom pricing, and multi-database support.



🎯 Key Features

  • AI Assistant: In-game help powered by Groq

🤖 AI-Powered Help SystemNEW in V12

  • Interactive AI Assistant: /vtrade help askquestion "How do I ban diamond items?"
  • Smart Q&A: Natural language questions about plugin features
  • Knowledge Base: Comprehensive built-in help system
  • Groq API Integration: Advanced AI responses with plugin context
  • Context-Aware: Understands your server's specific configuration
  • 24/7 Support: Instant answers without leaving the game
  • Plugin Expertise: Specialized knowledge about villager trade mechanics

Example AI Interactions:

/vtrade help askquestion "How do I set up custom prices for armorers?"
/vtrade help askquestion "What items should I ban to prevent economy exploits?"
/vtrade help askquestion "How does the villager leveling system work?"

💰 Universal Trade Pricing

  • All 13 Professions Supported: Armorer, Butcher, Cartographer, Cleric, Farmer, Fisherman, Fletcher, Leatherworker, Librarian, Mason, Shepherd, Toolsmith, Weaponsmith
  • Per-Trade Customization: Set emerald costs for any specific trade
  • Simple Commands: /vt setprice armorer diamond_leggings 30
  • Legacy Support: Maintains backward compatibility

🚫 Item Banning SystemNEW in V11

  • Complete Item Control: Ban entire items from all villager trades
  • Smart Filtering: Prevents enchanted variants when base item is banned
  • Easy Management: /vt banitem diamond_sword, /vt unbanitem diamond_sword
  • List Banned Items: /vt listbanneditems to see all banned items

💾 Multi-Database SupportNEW in V11

  • SQLite: Local file-based (default, recommended)
  • Supabase: Cloud REST API
  • PostgreSQL: Direct JDBC connections ⭐ NEW
  • Automatic Fallback: SQLite backup if cloud fails

Advanced Restock System

  • Instant Restock: /vt instantrestock on for immediate trade refresh
  • Custom Intervals: Set restock times with /vt restocktime <minutes>
  • Daily Limits: Control restocks per day with /vt restocklimit <count>
  • Unlimited Mode: /vt unlimitedrestock on for no restrictions

🎮 Multi-Platform Compatibility

  • Folia: Region-threaded scheduling for optimal performance
  • Paper/Purpur: Full API compatibility
  • Spigot/Bukkit: Legacy support maintained
  • Thread-Safe: All operations are concurrency-safe

📊 Real-Time Monitoring

  • Trade Analytics: Track trade statistics and patterns
  • Performance Metrics: Monitor plugin performance
  • Health Checks: Built-in system monitoring
  • Dynamic Detection: Automatically discovers new trades

📦 Installation

Requirements

  • Java 17 or higher
  • Minecraft Server: Paper, Spigot, Purpur, Bukkit, or Folia
  • Minecraft Version: 1.20.x - 1.21.x

Steps

  1. Download the plugin JAR file
  2. Stop your Minecraft server
  3. Place Minecraft-Villager-Trade-Manager-11.0.jar in the plugins/ folder
  4. Start your server to generate configuration files
  5. Configure plugins/VillagerTradeManager/config.yml as needed
  6. Restart server or use /reload (not recommended for production)

⚙️ Configuration

Basic Configuration

# Enable/disable the plugin
settings:
  trade_management_enabled: true

# Database selection
database:
  type: "sqlite"  # Options: sqlite, supabase, postgresql

# Restock settings
custom_restock_enabled: false
restock_interval_minutes: 30
restock_limit_per_day: 3
unlimited_restock: false
instant_restock_enabled: false

Database Configuration

database:
  type: "sqlite"
  sqlite:
    file: "villager_data.db"

Supabase (Cloud REST API)

database:
  type: "supabase"
  supabase:
    url: "https://your-project.supabase.co"
    apiKey: "your-anon-key"
    serviceKey: "your-service-key"
    schema: "public"

PostgreSQL (Direct JDBC) ⭐ NEW in V11

database:
  type: "postgresql"
  postgresql:
    connectionString: "postgresql://user:password@host:5432/database"

🖥️ Commands

Main Commands

| Command | Description | Example |
|---------|-------------|---------|
| /vt on/off | Enable/disable trade management | /vt on |
| /vt status | Show current settings and banned items | /vt status |

Trade Pricing

| Command | Description | Example |
|---------|-------------|---------|
| /vt setprice <profession> <item> <cost> | Set custom price for any trade | /vt setprice armorer diamond_leggings 30 |
| /vt resetprice <profession> <trade> | Reset trade to default price | /vt resetprice armorer armorer_l4_emerald_13_diamond_boots_1 |
| /vt listtrades <profession> | List all trades for a profession | /vt listtrades armorer |

Item Banning ⭐ NEW in V11

| Command | Description | Example |
|---------|-------------|---------|
| /vt banitem <item> | Ban item from all villager trades | /vt banitem diamond_sword |
| /vt unbanitem <item> | Allow item in villager trades | /vt unbanitem diamond_sword |
| /vt listbanneditems | Show all banned items | /vt listbanneditems |

Restock Management

| Command | Description | Example |
|---------|-------------|---------|
| /vt restock on/off | Enable custom restock system | /vt restock on |
| /vt restocktime <minutes> | Set restock interval | /vt restocktime 45 |
| /vt restocklimit <count> | Set daily restock limit | /vt restocklimit 5 |
| /vt unlimitedrestock on/off | Toggle unlimited restocks | /vt unlimitedrestock on |
| /vt instantrestock on/off | Enable instant restock | /vt instantrestock on |

Trade Analysis

| Command | Description | Example |
|---------|-------------|---------|
| /vt analyzetrades | Show trade statistics | /vt analyzetrades |
| /vt inspectvillager | Analyze nearest villager's trades | /vt inspectvillager |

Advanced Commands

| Command | Description | Example |
|---------|-------------|---------|
| /vt exporttrades json/yaml | Export trade configuration | /vt exporttrades json |
| /vt tradedetection on/off/status | Control dynamic trade detection | /vt tradedetection status |
| /vt cleardynamictrades | Clear old dynamic trade data | /vt cleardynamictrades |


💾 Database Options

  • Local file-based database
  • Zero configuration required
  • Best performance for most servers
  • Automatic backups and maintenance

Supabase (Cloud REST API)

  • Cloud-hosted PostgreSQL
  • REST API communication
  • Multi-server sync capability
  • Requires API keys and internet connection

PostgreSQL (Direct JDBC) ⭐ NEW in V11

  • Direct database connection using JDBC
  • Best performance for cloud databases
  • Compatible with Supabase, AWS RDS, Google Cloud SQL
  • Requires connection string configuration

🔧 Advanced Features

Item Banning System

Prevent entire items from appearing in villager trades:

# Ban diamond swords (prevents all enchanted variants too)
/vt banitem diamond_sword

# Ban enchanted golden apples
/vt banitem enchanted_golden_apple

# Check what's banned
/vt listbanneditems

# Allow items again
/vt unbanitem diamond_sword

Custom Pricing Examples

# Simple format (recommended)
/vt setprice armorer diamond_leggings 25
/vt setprice librarian protection_4 30
/vt setprice farmer emerald 2

### Database Migration
The plugin automatically handles database schema updates. When you update from older versions, the plugin will:

1. **Detect version differences**
2. **Apply migrations automatically**
3. **Preserve existing data**
4. **Log migration progress**

---

## 🔧 Troubleshooting

### Common Issues

#### Plugin Not Loading

Error: Could not load plugin

**Solution**: Ensure Java 17+ and compatible Minecraft version

#### Database Connection Failed

Failed to establish database connection

**Solutions**:
- Check database credentials
- Verify network connectivity (for cloud databases)
- Plugin automatically falls back to SQLite

#### Commands Not Working

/vt: Unknown command

**Solution**: Check console for permission errors or plugin conflicts

#### High CPU Usage
**Solutions**:
- Reduce `trade_monitor_frequency` in config
- Decrease `villager_scan_radius`
- Enable Folia for better performance

### Debug Mode
Enable debugging in `config.yml`:
```yaml
logging:
  debug_database: true
  debug_trades: true
  debug_restock: true

Performance Tuning

performance:
  trade_monitor_frequency: 60  # Ticks between checks
  villager_scan_radius: 32     # Blocks to scan

📊 Metrics & Monitoring

Health Checks

  • HTTP Endpoint: http://localhost:8080/health (if enabled)
  • Automatic Monitoring: System health checks every 30 seconds
  • Performance Metrics: CPU, memory, and trade statistics

Prometheus Integration

Enable Prometheus metrics in config.yml:

metrics:
  enabled: true
  prometheus:
    enabled: true

🤝 Support

Getting Help

  • Community: Join Discord for support

System Requirements

  • RAM: +50MB (depending on trade volume)
  • CPU: Minimal overhead
  • Storage: ~1MB for SQLite database
  • Network: Required for cloud databases only

📈 Version History

V11.0 (Latest)

  • Item Banning System: Ban entire items from villager trades
  • PostgreSQL Support: Direct JDBC connections to databases
  • Enhanced Commands: Improved tab completion and error messages
  • Bug Fixes: Resolved Supabase URL construction and authentication issues
  • Performance: Optimized database operations and memory usage

V10.x

  • Universal trade pricing for all professions
  • Folia compatibility and region-threaded scheduling
  • Advanced restock system with instant restock
  • Dynamic trade detection and storage

📜 License

MIT License - Free for personal and commercial use.


🙏 Credits

  • Developer: AlanTheDev (Villager Trade Manager Team)
  • Contributors: Minecraft server administrators and developers
  • Community: SpigotMC, PaperMC, and Minecraft communities

🎮 Ready to master your server's villager economy? Install Villager Trade Manager V11.0 today!


🧱 Technical Notes

  • Tested on Minecraft 1.20.x – 1.21.x
  • Supported server types: Folia, Paper, Purpur, Spigot, Bukkit
  • Async SQLite database persistence for settings and restock data
  • Thread-safe and region-threaded scheduling for Folia
  • Minimal CPU and memory overhead

🧭 Ideal Use Cases

  • Economy-focused servers maintaining fair villager trading systems.
  • Fast-paced gameplay or event servers requiring instant trade resets.
  • Large-scale Folia servers needing safe, concurrent villager management.

🆕 V11.0 Highlights

  • Universal Trade Manipulation: Control pricing for all 13 villager professions
  • Per-Trade Customization: Set custom emerald costs for any specific trade
  • Comprehensive Trade Registry: Complete mapping of all vanilla Minecraft trades
  • Content-Based Identification: Reliable trade identification using item hashing
  • Legacy Compatibility: Maintains backward compatibility with enchantment pricing
  • Enhanced Command System: Universal commands supporting all professions
  • Fixed Compilation Issues: Resolved API compatibility problems with current Minecraft versions

🧾 License

This plugin is open-source and licensed under the MIT License.
You are free to use, modify, and distribute with proper credit.


**V12.0 brings universal trade control to Villager Trade Manager —

Versions

Release
12.2
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 4mo ago
# Patched Database Connection Leak At ``` DynamicTradeStorageService.java ``` - Prevents connection pool exhaustion --- ## Patched AdaptiveCache Executor…
674
Release
12
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 7mo ago
# Villager Trade Manager v12 - Advanced Minecraft Villager Economy Control (1.20.x-1.21.x…
304
Release
11.1
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 7mo ago
# Changelog --- ## [11.1.0] - 2025-11-06 ### 🐛 Bug Fixes #### Folia Compatibility Fix ⭐ **CRITICAL** - **Plugin Loading Failure**: Fixed…
112
Release
11.0
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 7mo ago
# Changelog --- ## [11.0.0] - 2025-11-06 ### 🎉 Major Features #### Item Banning System ⭐ **NEW** - **Complete Item Control**: Ban entire items from…
41
Release
10.1
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 8mo ago
# Minor Bug Fixes * Fixed Access global region thread To specific region thread In Folia Compatibility * Other Minor Bug Fixes
158
Release
10.0
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 8mo ago
# Minecraft Villager Trade Manager — Version 10.0 **“Instant Restock Update”** --- ## 🚀 Key Features Implemented ### 1. Instant Restock System -…
28
Release
9.0
bukkit, folia, paper · 1.20, 1.20.1, 1.20.2 · 8mo ago
# 🧾 Minecraft Villager Trade Manager v9.0 ### *The Folia Expansion Update* [![Paper](https://img.shields.io/badge/Paper-1.20.x--1.21.x-blue.svg)](https:…
30
Release
8.0
bukkit, paper, purpur · 1.20, 1.20.1, 1.20.2 · 8mo ago
## 🔁 New in v8.0 — The Restock Update ### ⚙️ Custom Restock System Take command of villager restocking behavior with full flexibility: -…
36
Release
7.0
bukkit, paper, purpur · 1.20, 1.20.1, 1.20.2 · 8mo ago
# Minecraft Villager Trade Manager [![Minecraft](https://img.shields.io/badge/Minecraft-1.20.x--1.21.x-green.svg)](https://minecraft.net) [![Paper](https://img…
43
Release
6.0
bukkit, paper, purpur · 1.20, 1.20.1, 1.20.2 · 8mo ago
Version 6.0 - Multi-Version Compatibility Release ⚡ Major Features Cross-Version Compatibility: Now supports Minecraft versions 1.20.x through…
36
Release
4.0
bukkit, paper, purpur · 1.21, 1.21.4 · 8mo ago
Removed SQLite Dependency: Completely removed SQLite and replaced it with Java's built-in serialization File-based Storage: Custom prices are now saved to…
28
Release
3.0
bukkit, paper, purpur · 1.21, 1.21.4 · 8mo ago
Updated Sqlite Driver to 3.43.0.0
30

Comments 0

No comments yet. Be the first to share your thoughts.