Creators
Details
Licensed MIT
Published last year
Updated 4 months ago
All versions
1.2.7
Release
ShopTools 1.2.78 months ago 17
Compatibility
Minecraft: Java Edition
1.20.x
Platforms
Paper
Purpur
Changes
更新日志
v1.2.7 (2026-03-04)
🚀 新增功能
- 多线程商店数据加载:新增异步多线程加载机制,在插件启动时从
shops.json加载大量商店数据时不再阻塞服务器主线程 - 可配置线程数:新增
performance.load-threads配置项,支持自定义加载所用线程数(默认为0,即自动检测可用处理器数 - 2)
🔧 技术改进
- 三阶段加载流程:主线程捕获世界快照 → 异步线程执行文件 I/O 与 JSON 解析 → ForkJoinPool 并行对象转换 → 主线程重建内存缓存
- 线程安全设计:异步转换阶段使用世界名称快照代替
Bukkit.getWorld()调用,彻底避免异步线程访问 Bukkit API 引发的安全隐患 - 缓存重建分离:新增
rebuildCachesOnly()方法,加载时仅重建内存缓存而不重写磁盘文件,减少不必要的 I/O 开销
📊 性能提升
- 启动无阻塞:商店数据加载完全在后台执行,对主线程 TPS 无影响
- 并行加速:使用
ForkJoinPool并行转换 JSON 数据对象,在商店数量庞大(10000+)时效果尤为显著 - 加载耗时日志:控制台输出详细耗时信息,便于服务器管理员评估性能
⚙️ 配置变更
- 新增
performance.load-threads配置项0(默认):自动检测,使用可用处理器数 - 2个线程(最少 1 个)- 正整数:指定使用的线程数量
- 建议普通服务器保持默认,大型服务器(10000+ 商店)可适当增加
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:7SrEX5Ff:6CbPrpCD"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:7SrEX5Ff:6CbPrpCD"
}

