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

1,32k

Quick challenge

How far can you run before the mobs catch you?

Minecraft Villager Trade Manager

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

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 System ⭐ *NEW in V12*

- Plugin Expertise: `/vtrade help askquestion "How do I ban diamond items?"` - Plugin Expertise: Natural language questions about plugin features - Plugin Expertise: Comprehensive built-in help system - Plugin Expertise: Advanced AI responses with plugin context - Plugin Expertise: Understands your server's specific configuration - Plugin Expertise: 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

- Legacy Support: Armorer, Butcher, Cartographer, Cleric, Farmer, Fisherman, Fletcher, Leatherworker, Librarian, Mason, Shepherd, Toolsmith, Weaponsmith - Legacy Support: Set emerald costs for any specific trade - Legacy Support: `/vt setprice armorer diamond_leggings 30` - Legacy Support: Maintains backward compatibility

🚫 Item Banning System ⭐ *NEW in V11*

- List Banned Items: Ban entire items from all villager trades - List Banned Items: Prevents enchanted variants when base item is banned - List Banned Items: `/vt banitem diamond_sword`, `/vt unbanitem diamond_sword` - List Banned Items: `/vt listbanneditems` to see all banned items

💾 Multi-Database Support ⭐ *NEW in V11*

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

Advanced Restock System

- Unlimited Mode: `/vt instantrestock on` for immediate trade refresh - Unlimited Mode: Set restock times with `/vt restocktime <minutes>` - Unlimited Mode: Control restocks per day with `/vt restocklimit <count>` - Unlimited Mode: `/vt unlimitedrestock on` for no restrictions

🎮 Multi-Platform Compatibility

- Thread-Safe: Region-threaded scheduling for optimal performance - Thread-Safe: Full API compatibility - Thread-Safe: Legacy support maintained - Thread-Safe: All operations are concurrency-safe

📊 Real-Time Monitoring

- Dynamic Detection: Track trade statistics and patterns - Dynamic Detection: Monitor plugin performance - Dynamic Detection: Built-in system monitoring - Dynamic Detection: Automatically discovers new trades

---

📦 Installation

Requirements

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

Steps

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

---

⚙️ Configuration

Basic Configuration

```yaml

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

SQLite (Recommended)

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

Supabase (Cloud REST API)

```yaml 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*

```yaml 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

SQLite (Default - Recommended)

- Automatic backups database - Automatic backups required - Automatic backups for most servers - Automatic backups and maintenance

Supabase (Cloud REST API)

- Requires API keys PostgreSQL - Requires API keys communication - Requires API keys capability - Requires API keys and internet connection

PostgreSQL (Direct JDBC) ⭐ *NEW in V11*

- Requires connection string using JDBC - Requires connection string for cloud databases - Requires connection string Supabase, AWS RDS, Google Cloud SQL - Requires connection string configuration

---

🔧 Advanced Features

Item Banning System

Prevent entire items from appearing in villager trades:

```bash

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

```bash

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. Log migration progress 2. Log migration progress 3. Log migration progress 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

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

---

📊 Metrics & Monitoring

Health Checks

- Performance Metrics: `http://localhost:8080/health` (if enabled) - Performance Metrics: System health checks every 30 seconds - Performance Metrics: CPU, memory, and trade statistics

Prometheus Integration

Enable Prometheus metrics in `config.yml`: ```yaml metrics: enabled: true prometheus: enabled: true ```

---

🤝 Support

Getting Help

- Community: Join Discord for support

System Requirements

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

---

📈 Version History

V11.0 (Latest)

- ✅ Performance: Ban entire items from villager trades - ✅ Performance: Direct JDBC connections to databases - ✅ Performance: Improved tab completion and error messages - ✅ Performance: 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

- Community: AlanTheDev (Villager Trade Manager Team) - Community: 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 Folia, Paper, Purpur, Spigot, Bukkit - 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

- Fixed Compilation Issues: Control pricing for all 13 villager professions - Fixed Compilation Issues: Set custom emerald costs for any specific trade - Fixed Compilation Issues: Complete mapping of all vanilla Minecraft trades - Fixed Compilation Issues: Reliable trade identification using item hashing - Fixed Compilation Issues: Maintains backward compatibility with enchantment pricing - Fixed Compilation Issues: 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 —

ADS