Minecraft Villager Trade Manager V12.0 - 完整的村民交易经济管理
终极 Minecraft 村民交易管理插件 - 通过物品禁止、自定义定价和多数据库支持等高级功能,全面控制村民交易经济。
? 主要功能
- AI 助手: 由 Groq 提供支持的内置帮助系统
? AI 驱动的帮助系统 ⭐ V12 新增
- 交互式 AI 助手:
/vtrade help askquestion "How do I ban diamond items?"
- 智能问答: 关于插件功能的自然语言提问
- 知识库: 全面的内置帮助系统
- Groq API 集成: 结合插件上下文的先进 AI 响应
- 上下文感知: 理解您服务器的特定配置
- 全天候支持: 无需离开游戏即可即时获取答案
- 插件专业知识: 专门针对村民交易机制的知识
AI 交互示例:
/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?"
? 通用交易定价
- 支持所有 13 种职业: 盔甲匠、屠夫、制图师、牧师、农民、渔夫、弓箭手、皮革工匠、图书管理员、石匠、牧羊人、工具匠、武器匠
- 逐笔交易定制: 为任何特定交易设置绿宝石成本
- 简单命令:
/vt setprice armorer diamond_leggings 30
- 向后兼容: 保持旧版兼容性
? 物品禁止系统 ⭐ V11 新增
- 完全物品控制: 禁止所有村民交易中的整个物品
- 智能过滤: 当基础物品被禁止时,防止附魔变体出现
- 易于管理:
/vt banitem diamond_sword, /vt unbanitem diamond_sword
- 列出禁止的物品: 使用
/vt listbanneditems 查看所有禁止物品
? 多数据库支持 ⭐ V11 新增
- SQLite: 基于本地文件(默认,推荐)
- Supabase: 云 REST API
- PostgreSQL: 直接 JDBC 连接 ⭐ V11 新增
- 自动回退: 如果云服务失败,则回退到 SQLite
⚡ 高级补货系统
- 即时补货: 使用
/vt instantrestock on 立即刷新交易
- 自定义间隔: 使用
/vt restocktime <minutes> 设置补货时间
- 每日限制: 使用
/vt restocklimit <count> 控制每日补货次数
- 无限模式: 使用
/vt unlimitedrestock on 解除所有限制
? 多平台兼容性
- Folia: 区域线程调度以实现最佳性能
- Paper/Purpur: 完全 API 兼容
- Spigot/Bukkit: 保持旧版支持
- 线程安全: 所有操作都是并发安全的
? 实时监控
- 交易分析: 跟踪交易统计数据和模式
- 性能指标: 监控插件性能
- 健康检查: 内置系统监控
- 动态检测: 自动发现新交易
? 安装
要求
- Java 17 或更高版本
- Minecraft Server: Paper, Spigot, Purpur, Bukkit 或 Folia
- Minecraft Version: 1.20.x - 1.21.x
步骤
- 下载 插件 JAR 文件
- 停止 您的 Minecraft 服务器
- 将
Minecraft-Villager-Trade-Manager-11.0.jar 放置 在 plugins/ 文件夹中
- 启动 服务器以生成配置文件
- 根据需要配置
plugins/VillagerTradeManager/config.yml
- 重启 服务器或使用
/reload(不推荐在生产环境中使用)
⚙️ 配置
基本配置
# 启用/禁用插件
settings:
trade_management_enabled: true
# 数据库选择
database:
type: "sqlite" # 选项:sqlite, supabase, postgresql
# 补货设置
custom_restock_enabled: false
restock_interval_minutes: 30
restock_limit_per_day: 3
unlimited_restock: false
instant_restock_enabled: false
数据库配置
SQLite (推荐)
database:
type: "sqlite"
sqlite:
file: "villager_data.db"
Supabase (云 REST API)
database:
type: "supabase"
supabase:
url: "https://your-project.supabase.co"
apiKey: "your-anon-key"
serviceKey: "your-service-key"
schema: "public"
PostgreSQL (直接 JDBC) ⭐ V11 新增
database:
type: "postgresql"
postgresql:
connectionString: "postgresql://user:password@host:5432/database"
?️ 命令
主要命令
| 命令 |
描述 |
示例 |
/vt on/off |
启用/禁用交易管理 |
/vt on |
/vt status |
显示当前设置和禁止的物品 |
/vt status |
交易定价
| 命令 |
描述 |
示例 |
/vt setprice <profession> <item> <cost> |
为任何交易设置自定义价格 |
/vt setprice armorer diamond_leggings 30 |
/vt resetprice <profession> <trade> |
将交易重置为默认价格 |
/vt resetprice armorer armorer_l4_emerald_13_diamond_boots_1 |
/vt listtrades <profession> |
列出某职业的所有交易 |
/vt listtrades armorer |
物品禁用 ⭐ V11 新增功能
| 命令 |
描述 |
示例 |
/vt banitem <item> |
禁止所有村民交易中出现该物品 |
/vt banitem diamond_sword |
/vt unbanitem <item> |
允许在村民交易中使用该物品 |
/vt unbanitem diamond_sword |
/vt listbanneditems |
显示所有被禁用的物品 |
/vt listbanneditems |
补货管理
| 命令 |
描述 |
示例 |
/vt restock on/off |
启用自定义补货系统 |
/vt restock on |
/vt restocktime <minutes> |
设置补货间隔时间 |
/vt restocktime 45 |
/vt restocklimit <count> |
设置每日补货上限 |
/vt restocklimit 5 |
/vt unlimitedrestock on/off |
切换无限补货模式 |
/vt unlimitedrestock on |
/vt instantrestock on/off |
启用即时补货 |
/vt instantrestock on |
交易分析
| 命令 |
描述 |
示例 |
/vt analyzetrades |
显示交易统计数据 |
/vt analyzetrades |
/vt inspectvillager |
分析最近村民的交易 |
/vt inspectvillager |
高级命令
| 命令 |
描述 |
示例 |
/vt exporttrades json/yaml |
导出交易配置 |
/vt exporttrades json |
/vt tradedetection on/off/status |
控制动态交易检测 |
/vt tradedetection status |
/vt cleardynamictrades |
清除旧的动态交易数据 |
/vt cleardynamictrades |
? 数据库选项
SQLite(默认 - 推荐)
- 基于本地文件的数据库
- 无需配置
- 大多数服务器性能最佳
- 自动备份和维护
Supabase(云 REST API)
- 云端托管 PostgreSQL
- REST API 通信
- 多服务器同步功能
- 需要 API 密钥和互联网连接
PostgreSQL(直接 JDBC) ⭐ V11 新增功能
- 使用 JDBC 进行直接数据库连接
- 云端数据库性能最佳
- 兼容 Supabase、AWS RDS、Google Cloud SQL
- 需要配置连接字符串
? 高级功能
物品禁用系统
防止整个类型的物品出现在村民交易中:
# 禁止钻石剑(同时阻止所有附魔变体)
/vt banitem diamond_sword
# 禁止附魔金苹果
/vt banitem enchanted_golden_apple
# 查看已禁用的物品
/vt listbanneditems
# 重新允许物品
/vt unbanitem diamond_sword
自定义定价示例
# 简单格式(推荐)
/vt setprice armorer diamond_leggings 25
/vt setprice librarian protection_4 30
/vt setprice farmer emerald 2
### 数据库迁移
插件会自动处理数据库架构更新。当您从旧版本更新时,插件将执行以下操作:
1. **检测版本差异**
2. **自动应用迁移**
3. **保留现有数据**
4. **记录迁移进度**
---
## ? 故障排除
### 常见问题
#### 插件未加载
Error: Could not load plugin
**解决方案**:确保 Java 17+ 且 Minecraft 版本兼容
#### 数据库连接失败
Failed to establish database connection
**解决方案**:
- 检查数据库凭据
- 验证网络连接(针对云端数据库)
- 插件会自动回退到 SQLite
#### 命令无效
/vt: Unknown command
**解决方案**:检查控制台中的权限错误或插件冲突
#### CPU 占用过高
**解决方案**:
- 在配置中减少 `trade_monitor_frequency`
- 减小 `villager_scan_radius`
- 启用 Folia 以获得更好的性能
### 调试模式
在 `config.yml` 中启用调试:
```yaml
logging:
debug_database: true
debug_trades: true
debug_restock: true
性能调优
performance:
trade_monitor_frequency: 60 # 检查之间的刻数
villager_scan_radius: 32 # 扫描的方块范围
? 指标与监控
健康检查
- HTTP 端点:
http://localhost:8080/health(如果已启用)
- 自动监控:每 30 秒进行一次系统健康检查
- 性能指标:CPU、内存和交易统计信息
Prometheus 集成
在 config.yml 中启用 Prometheus 指标:
metrics:
enabled: true
prometheus:
enabled: true
? 支持
获取帮助
系统要求
- 内存:+50MB(取决于交易量)
- CPU:极小的开销
- 存储:SQLite 数据库约 ~1MB
- 网络:仅云端数据库需要
? 版本历史
V11.0(最新版)
- ✅ 物品禁用系统:禁止整个物品类型出现在村民交易中
- ✅ PostgreSQL 支持:数据库的直接 JDBC 连接
- ✅ 增强命令:改进了 Tab 补全和错误消息
- ✅ Bug 修复:解决了 Supabase URL 构造和认证问题
- ✅ 性能:优化了数据库操作和内存使用
V10.x
- 所有职业的全局交易定价
- Folia 兼容性及区域线程调度
- 带有即时补货的高级补货系统
- 动态交易检测和存储
? 许可证
MIT 许可证 - 个人和商业用途免费。
? 致谢
- 开发者:AlanTheDev(Villager Trade Manager 团队)
- 贡献者:Minecraft 服务器管理员和开发人员
- 社区:SpigotMC、PaperMC 和 Minecraft 社区
? 准备好掌握服务器的村民经济了吗?今天安装 Villager Trade Manager V11.0!
? 技术说明
- 已在 Minecraft 1.20.x – 1.21.x 上测试
- 支持的服务器类型:Folia, Paper, Purpur, Spigot, Bukkit
- 异步 SQLite 数据库持久化(用于设置和补货数据)
- 线程安全及 Folia 的区域线程调度
- 极小的 CPU 和内存开销
? 理想使用场景
- 注重经济系统、维持公平村民交易系统的服务器。
- 需要即时重置交易的快节奏游戏或活动服务器。
- 需要安全且并发管理村民的大规模 Folia 服务器。
? V11.0 亮点
- 通用交易操控:控制所有 13 种村民职业的价格
- 单次交易自定义:为任何特定交易设置自定义绿宝石成本
- 全面交易注册表:完整映射所有原版 Minecraft 交易
- 基于内容的识别:使用物品哈希值进行可靠的交易识别
- 旧版兼容性:保持与附魔定价的向后兼容性
- 增强型命令系统:支持所有职业的通用命令
- 修复编译问题:解决了与当前 Minecraft 版本的 API 兼容性问题
? 许可证
本插件为开源软件,采用 MIT License 许可。
您可以自由使用、修改和分发,但需注明出处。
**V12.0 将通用交易控制权带给了 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
- 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 System ⭐ NEW 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 Support ⭐ NEW 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
- Download the plugin JAR file
- Stop your Minecraft server
- Place
Minecraft-Villager-Trade-Manager-11.0.jar in the plugins/ folder
- Start your server to generate configuration files
- Configure
plugins/VillagerTradeManager/config.yml as needed
- 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
SQLite (Recommended)
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
SQLite (Default - Recommended)
- 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 —
评论 0
登录后参与评分
还没有评论,来抢沙发吧