ShopTools (English)
注意: 本插件由 AI 开发。
一款功能强大的 Minecraft 商店查询插件,为 QuickShop-Reremake 提供全面的商店信息管理以及智能搜索功能。
特性
- 自动数据同步:在服务器启动时自动从 QuickShop 读取商店数据
- 智能排序:支持多种排序方式(物品 ID、价格、所有者等)
- 缓存优化:高效的数据缓存机制,提升查询性能
- 中文本地化:完整的中文界面和消息支持
命令
玩家命令
/shoptools search <item_id> [page] 或 /st search <item_id> [page] - 搜索所有指定物品的商店(智能距离显示,按距离排序)
/shoptools near [page] 或 /st near [page] - 查看 200 格内的所有商店(按距离排序)
/shoptools help 或 /st help - 显示帮助信息
管理员命令
/shoptools page <page> 或 /st page <page> - 分页显示所有商店(每页 10 个,按物品 ID 字母顺序排序)
/shoptools list <item_id> [page] 或 /st list <item_id> [page] - 显示指定物品的商店(支持分页,按价格升序排序)
/shoptools who <player_name/uuid> [page] 或 /st who <player_name/uuid> [page] - 智能玩家商店搜索(支持模糊匹配、UUID 搜索、分页)
/shoptools reload 或 /st reload - 重新加载配置和数据
权限
shoptools.use - 允许使用基本命令(默认:需要手动授权)
shoptools.admin - 允许使用管理员命令(默认:操作员)
安装
要求
- Minecraft 1.20.1+
- Paper/Spigot 服务器
- QuickShop-Reremake 插件
安装步骤
- 下载最新的
ShopTools-1.0-SNAPSHOT.jar
- 将其放入服务器的
plugins 文件夹中
- 重启服务器
- 插件将自动创建配置文件并同步商店数据
配置
插件会自动创建 plugins/ShopTools/config.yml,结构如下:
# 数据同步设置
data-sync:
auto-sync-on-startup: true
sync-interval-minutes: 30
# 命令冷却设置
cooldown:
# 玩家命令冷却时间(秒)
player-commands: 3
# 管理员是否绕过冷却限制
admin-bypass: true
# 消息设置
messages:
# 玩家命令
help-search: "&e/shoptools search <item_id> [page] &7- 搜索所有指定物品的商店(按距离排序)"
help-near: "&e/shoptools near [page] &7- 查看 200 格内的所有商店"
# 管理员命令
help-page: "&e/shoptools page <page> &7- 分页显示所有商店 &c(管理员)"
help-list: "&e/shoptools list <item_id> [page] &7- 显示指定物品的商店 &c(管理员)"
help-who: "&e/shoptools who <player_name/uuid> [page] &7- 显示指定玩家的商店 &c(管理员)"
help-reload: "&e/shoptools reload &7- 重新加载配置和数据 &c(管理员)"
核心特性
智能距离显示
- 0-200 格:显示精确距离(例如 "15.3m", "89.7m")
- 超过 200 格:显示 "200m+"
- 其他世界:显示 "otherworld"
智能搜索
- 模糊匹配:输入 "DIA" 可匹配 "DIAMOND"
- UUID 支持:通过 UUID 搜索玩家
- 多结果处理:当找到多个匹配项时提供智能建议
分页系统
- 智能分页:≤10 个物品直接显示,>10 个物品自动分页
- 导航提示:清晰的上/下一页命令提示
- 性能优化:避免一次性显示大量数据
商业保护
- 隐私保护:隐藏全服价格信息,防止价格战
- 距离优先:鼓励本地交易,维持地理经济平衡
- 权限分离:玩家使用附近搜索,管理员使用全服查询
版本历史
v1.2.0 (2025-07-29) ? 方向指示器与稳定性增强
? 方向指示器系统:
- ✨ 智能方向显示:为所有相对位置查询添加了方向指示器(E, W, S, N 等)
- ? 精确方向计算:基于坐标差异的 8 方向计算系统(N, NE, E, SE, S, SW, W, NW)
- ? 距离格式优化:显示格式为 "方向 距离",例如 "E 15.3m", "W 25.7m"
- ? 跨世界支持:不同世界显示 "otherworld",避免无效的方向计算
? 稳定性修复:
- ?️ 八叉树边界修复:解决了空间细分期间的边界计算错误(minY > maxY 问题)
- ? 安全细分算法:增强了极小范围和边缘情况的处理
- ⚡ 性能保障:确保在所有数据规模下空间索引的稳定运行
- ?️ 异常处理:全面的错误恢复机制,防止因细分失败导致的崩溃
? 功能覆盖:
- ✅
/shoptools search - 商店搜索现在显示方向和距离
- ✅
/shoptools near - 附近商店查询包含方向信息
- ✅
/shoptools locate - 位置点查询显示精确方向
- ✅ 所有功能统一了距离显示格式,提升了用户体验
v1.1.0 (2025-07-24)
- ? 增强权限系统:
shoptools.use 权限默认改为 false,需要手动授权
- ✨ 命令冷却机制:为
/st search 和 /st near 命令添加了 3 秒冷却时间
- ✨ 管理员绕过:拥有
shoptools.admin 权限的用户不受冷却限制
- ? 性能保护:防止频繁的玩家请求导致服务器卡顿
- ? 配置优化:添加了冷却配置节点,支持自定义冷却时间
- ? 修复命令注册:从 plugin.yml 中移除了权限字段,解决了双重权限检查问题
- ? 修复权限继承:管理员权限现在正确包含基本权限,支持权限层级
v1.0.9 (2025-07-24)
- ✨ 增强
/st search 功能:将搜索范围扩展至所有服务器商店
- ✨ 智能距离显示:0-200 格显示精确距离,>200 格显示 "200m+",其他世界显示 "otherworld"
- ✨ 优化排序算法:同世界商店按距离排序,其他世界商店排在最后
- ? 商业平衡:保持距离信息模糊,保护商业竞争平衡
- ? 跨世界支持:玩家可以发现其他世界的商店,鼓励探索
v1.0.8 (2025-07-24)
- ✨ 权限系统重构:分离管理员和玩家功能,保护商业信息隐私
- ✨ 新增
/st search 命令:搜索 200 格内指定物品的商店,按距离排序
- ✨ 新增
/st near 命令:查看 200 格内的所有商店,按距离排序
- ? 距离显示:价格位置显示玩家与商店之间的距离(例如 "15.3m")
- ? 商业保护:隐藏全服价格信息,防止商业战争,维持游戏平衡
- ? 智能权限:玩家使用附近搜索,管理员使用全服查询
v1.0.7 (2025-07-24)
- ✨ 全面的分页支持:为
/st list 和 /st who 命令添加分页功能
- ✨ 智能分页逻辑:≤10 个商店直接显示,>10 个商店自动分页
- ✨ 增强 Tab 补全:支持物品和玩家页数的智能补全
- ? 优化大数据显示:避免一次性显示大量商店导致的性能问题
- ? 改善用户体验:默认显示第 1 页,提供清晰的导航提示
v1.0.6 (2025-07-24)
- ✨ 智能玩家搜索系统:支持 UUID 搜索、模糊匹配、多结果处理
- ✨ 相似度算法:在未找到匹配项时提供智能建议(编辑距离算法)
- ✨ 多结果显示:当多个玩家匹配时,显示选择列表,按商店数量排序
- ? 增强
/st who 命令:支持部分玩家名称、完整 UUID、智能提示
- ? 性能优化:玩家信息缓存,避免重复查询
v1.0.5 (2025-07-24)
-
✨ 实现了分页系统:避免一次性显示大量商店信息,每页显示 10 个商店
-
✨ UUID 转玩家名称转换:智能获取真实玩家名称,提升可读性
-
✨ 添加了商店状态显示:[出售中]/[购买中]/[两者] 状态指示器
-
? 命令重构:移除了 /st list 显示所有商店的功能,改为 /st page <页码>
-
? 增强 Tab 补全:支持页码补全与智能命令提示
-
? 优化用户体验:添加导航提示与错误引导
v1.0.4 (2025-07-24)
- ? 修复了 Java 模块系统序列化问题:解决了 Optional 字段访问限制
- ? 实现了简化的数据传输对象(DTO)策略,避免复杂的对象序列化
- ? 优化了 JSON 格式,提供更好的跨版本兼容性
- ? 成功支持超过 6000 个商店数据的完整序列化与存储
v1.0.3 (2025-07-24)
- ? 修复线程安全问题:确保所有 QuickShop API 调用均在主线程上执行
- ? 改进数据同步机制,避免“非法访问”错误
- ? 优化性能,支持处理大量商店数据(6000+ 商店)
v1.0.2 (2025-07-24)
- ? 修复 Gson 序列化问题:正确实现了 Location 和 ItemStack 类型适配器
- ? 改进 JSON 数据格式,提供更好的可读性和兼容性
- ? 增强错误处理,避免因序列化失败导致的崩溃
v1.0.1 (2025-07-24)
- ? 修复插件启动顺序问题:确保在初始化前 QuickShop 已完全启动
- ? 添加延迟初始化机制,避免 API 调用失败
- ? 改进错误处理和用户提示
- ? 添加重试机制,提高初始化成功率
v1.0 (2025-07-24)
- ? 首次发布
- ✨ 基础商店列表功能
- ✨ QuickShop-Reremake 集成
- ✨ 自动数据同步
- ✨ 中文本地化支持
技术支持
如果您遇到问题或有功能建议,请:
- 检查控制台日志以获取详细的错误信息
- 确认 QuickShop-Reremake 插件运行正常
- 验证权限配置是否正确
- 在 GitHub Issues 上报告问题
兼容性
- ✅ QuickShop-Reremake 5.x
- ✅ Paper 1.20.1+
- ✅ Spigot 1.20.1+
- ⚠️ 其他 QuickShop 分支可能需要适配
注意:本插件需要 QuickShop-Reremake 插件才能正常运行。请确保在安装此插件之前,QuickShop-Reremake 已正确安装并配置。
本插件完美解决了大型服务器中商店信息查询的痛点,为玩家和管理员提供了强大且易用的商店管理工具!
ShopTools (English)
Note: This plugin is developed by AI.
A powerful Minecraft shop query plugin that provides comprehensive shop information management and intelligent search capabilities for QuickShop-Reremake.
Features
- Automatic Data Sync: Automatically reads shop data from QuickShop on server startup
- Intelligent Sorting: Supports multiple sorting methods (item ID, price, owner, etc.)
- Cache Optimization: Efficient data caching mechanism for improved query performance
- Chinese Localization: Complete Chinese interface and message support
Commands
Player Commands
/shoptools search <item_id> [page] or /st search <item_id> [page] - Search all shops for specified items (smart distance display, sorted by distance)
/shoptools near [page] or /st near [page] - View all shops within 200 blocks (sorted by distance)
/shoptools help or /st help - Show help information
Admin Commands
/shoptools page <page> or /st page <page> - Paginated display of all shops (10 per page, sorted by item ID alphabetically)
/shoptools list <item_id> [page] or /st list <item_id> [page] - Show shops for specified items (supports pagination, sorted by price ascending)
/shoptools who <player_name/uuid> [page] or /st who <player_name/uuid> [page] - Smart player shop search (supports fuzzy matching, UUID search, pagination)
/shoptools reload or /st reload - Reload configuration and data
Permissions
shoptools.use - Allow use of basic commands (default: requires manual authorization)
shoptools.admin - Allow use of admin commands (default: operators)
Installation
Requirements
- Minecraft 1.20.1+
- Paper/Spigot server
- QuickShop-Reremake plugin
Installation Steps
- Download the latest
ShopTools-1.0-SNAPSHOT.jar
- Place it in the server's
plugins folder
- Restart the server
- The plugin will automatically create configuration files and sync shop data
Configuration
The plugin automatically creates plugins/ShopTools/config.yml with the following structure:
# Data sync settings
data-sync:
auto-sync-on-startup: true
sync-interval-minutes: 30
# Command cooldown settings
cooldown:
# Player command cooldown time (seconds)
player-commands: 3
# Whether admins bypass cooldown restrictions
admin-bypass: true
# Message settings
messages:
# Player commands
help-search: "&e/shoptools search <item_id> [page] &7- Search all shops for specified items (sorted by distance)"
help-near: "&e/shoptools near [page] &7- View all shops within 200 blocks"
# Admin commands
help-page: "&e/shoptools page <page> &7- Paginated display of all shops &c(Admin)"
help-list: "&e/shoptools list <item_id> [page] &7- Show shops for specified items &c(Admin)"
help-who: "&e/shoptools who <player_name/uuid> [page] &7- Show specified player's shops &c(Admin)"
help-reload: "&e/shoptools reload &7- Reload configuration and data &c(Admin)"
Key Features
Smart Distance Display
- 0-200 blocks: Shows precise distance (e.g., "15.3m", "89.7m")
- Over 200 blocks: Shows "200m+"
- Other worlds: Shows "otherworld"
Intelligent Search
- Fuzzy matching: Input "DIA" matches "DIAMOND"
- UUID support: Search players by UUID
- Multi-result handling: Smart suggestions when multiple matches found
Pagination System
- Smart pagination: ≤10 items show directly, >10 items auto-paginate
- Navigation hints: Clear previous/next page commands
- Performance optimization: Avoid displaying large amounts of data at once
Business Protection
- Privacy protection: Hide server-wide price information to prevent price wars
- Distance priority: Encourage local trading, maintain geographical economic balance
- Permission separation: Players use nearby search, admins use server-wide queries
Version History
v1.2.0 (2025-07-29) ? Direction Indicators & Stability Enhancement
? Direction Indicator System:
- ✨ Smart Direction Display: Added direction indicators (E, W, S, N, etc.) for all relative position queries
- ? Precise Direction Calculation: 8-direction calculation system based on coordinate differences (N, NE, E, SE, S, SW, W, NW)
- ? Distance Format Optimization: Display format as "Direction Distance", e.g., "E 15.3m", "W 25.7m"
- ? Cross-world Support: Different worlds display "otherworld", avoiding invalid direction calculations
? Stability Fixes:
- ?️ Octree Boundary Fix: Resolved boundary calculation errors during spatial subdivision (minY > maxY issue)
- ? Safe Subdivision Algorithm: Enhanced handling of extremely small ranges and edge cases
- ⚡ Performance Guarantee: Ensure stable operation of spatial indexing at all data scales
- ?️ Exception Handling: Comprehensive error recovery mechanisms, prevent crashes from subdivision failures
? Feature Coverage:
- ✅
/shoptools search - Shop search now displays direction and distance
- ✅
/shoptools near - Nearby shop queries include direction information
- ✅
/shoptools locate - Location point queries show precise directions
- ✅ Unified distance display format across all features, improved user experience
v1.1.0 (2025-07-24)
- ? Enhanced permission system:
shoptools.use permission default changed to false, requires manual authorization
- ✨ Command cooldown mechanism: Added 3-second cooldown for
/st search and /st near commands
- ✨ Admin bypass: Users with
shoptools.admin permission are not subject to cooldown restrictions
- ? Performance protection: Prevent server lag from frequent player requests
- ? Configuration optimization: Added cooldown configuration node, supports custom cooldown time
- ? Fixed command registration: Removed permission fields from plugin.yml, resolved double permission check issue
- ? Fixed permission inheritance: Admin permissions now correctly include basic permissions, supports permission hierarchy
v1.0.9 (2025-07-24)
- ✨ Enhanced
/st search feature: Extended search range to all server shops
- ✨ Smart distance display: 0-200 blocks show precise distance, >200 blocks show "200m+", other worlds show "otherworld"
- ✨ Optimized sorting algorithm: Same-world shops sorted by distance, other-world shops placed last
- ? Business balance: Maintain distance information ambiguity, protect business competition balance
- ? Cross-world support: Players can discover shops in other worlds, encourage exploration
v1.0.8 (2025-07-24)
- ✨ Permission system restructure: Separate admin and player functions, protect business information privacy
- ✨ New
/st search command: Search shops within 200 blocks for specified items, sorted by distance
- ✨ New
/st near command: View all shops within 200 blocks, sorted by distance
- ? Distance display: Price position shows distance between player and shop (e.g., "15.3m")
- ? Business protection: Hide server-wide price information, prevent business wars, maintain game balance
- ? Smart permissions: Players use nearby search, admins use server-wide queries
v1.0.7 (2025-07-24)
- ✨ Comprehensive pagination support: Added pagination for
/st list and /st who commands
- ✨ Smart pagination logic: ≤10 shops show directly, >10 shops auto-paginate
- ✨ Enhanced Tab completion: Support smart completion for item and player page numbers
- ? Optimized large data display: Avoid performance issues from displaying large amounts of shops at once
- ? Improved user experience: Default to page 1, provide clear navigation hints
v1.0.6 (2025-07-24)
- ✨ Smart player search system: Support UUID search, fuzzy matching, multi-result handling
- ✨ Similarity algorithm: Provide smart suggestions when no matches found (edit distance algorithm)
- ✨ Multi-result display: Show selection list when multiple players match, sorted by shop count
- ? Enhanced
/st who command: Support partial player names, complete UUIDs, smart hints
- ? Performance optimization: Player information caching, avoid repeated queries
v1.0.5 (2025-07-24)
- ✨ Implemented pagination system: Avoid displaying large amounts of shop information at once, 10 shops per page
- ✨ UUID to player name conversion: Smart retrieval of real player names, improve readability
- ✨ Added shop status display: [Selling]/[Buying]/[Both] status indicators
- ? Command restructure: Removed
/st list show all shops, changed to /st page <page>
- ? Enhanced Tab completion: Support page number completion and smart command hints
- ? Optimized user experience: Added navigation hints and error guidance
v1.0.4 (2025-07-24)
- ? Fixed Java module system serialization issues: Resolved Optional field access restrictions
- ? Implemented simplified Data Transfer Object (DTO) strategy, avoid complex object serialization
- ? Optimized JSON format, provide better cross-version compatibility
- ? Successfully support complete serialization and storage of 6000+ shop data
v1.0.3 (2025-07-24)
- ? Fixed thread safety issues: Ensure all QuickShop API calls execute on main thread
- ? Improved data sync mechanism, avoid "Illegal Access" errors
- ? Optimized performance, support handling large amounts of shop data (6000+ shops)
v1.0.2 (2025-07-24)
- ? Fixed Gson serialization issues: Properly implemented Location and ItemStack type adapters
- ? Improved JSON data format, provide better readability and compatibility
- ? Enhanced error handling, avoid crashes from serialization failures
v1.0.1 (2025-07-24)
- ? Fixed plugin startup order issues: Ensure QuickShop fully starts before initialization
- ? Added delayed initialization mechanism, avoid API call failures
- ? Improved error handling and user prompts
- ? Added retry mechanism, improve initialization success rate
v1.0 (2025-07-24)
- ? Initial release
- ✨ Basic shop listing functionality
- ✨ QuickShop-Reremake integration
- ✨ Automatic data synchronization
- ✨ Chinese localization support
Technical Support
If you encounter issues or have feature suggestions, please:
- Check console logs for detailed error information
- Confirm QuickShop-Reremake plugin is running properly
- Verify permission configuration is correct
- Report issues on GitHub Issues
Compatibility
- ✅ QuickShop-Reremake 5.x
- ✅ Paper 1.20.1+
- ✅ Spigot 1.20.1+
- ⚠️ Other QuickShop forks may require adaptation
Note: This plugin requires QuickShop-Reremake plugin to function properly. Please ensure QuickShop-Reremake is correctly installed and configured before installing this plugin.
This plugin perfectly solves the pain points of shop information queries on large servers, providing powerful and easy-to-use shop management tools for both players and administrators!
评论 0
登录后参与评分
还没有评论,来抢沙发吧