⏱ TrialTimer
可配置的试炼刷怪笼冷却时间 —— 因为 30 分钟实在太太太长了。
? 功能简介
原版 Trial Spawner(试炼刷怪笼)在波次完成后具有硬编码的 30 分钟冷却时间。
TrialTimer 允许你将其设置为任意时长——如果需要,甚至可以缩短至几秒钟。
无需客户端模组。完全在服务器端运行。
当刷怪笼完成冷却后,附近玩家会收到一条广播消息,告知他们刷怪笼已准备好再次战斗。
⚙️ 工作原理
30 分钟的规则是 Minecraft 源代码中硬编码的,因此数据包无法修改它。
TrialTimer 通过更改刷怪笼的 cooldownEndsAt 值来绕过这一限制:
当刷怪笼进入冷却状态时,插件会用你配置的时间覆盖该值。
Minecraft 随后读取该值并判定冷却结束 —— 简单且高效。
- Paper / Purpur / Folia: 使用 Bukkit API (
TrialSpawner#setCooldownEnd)
- Spigot: API 没有提供设置冷却结束的方法,因此插件会自动回退到反射机制
- Folia: 扫描任务在区域调度器上运行
? 安装指南
- 确保你的服务器运行的是 Minecraft 26.x 和 Java 25
- 将
TrialTimer-x.x.x.jar 放入 plugins/ 文件夹
- 重启服务器
- 编辑
plugins/TrialTimer/config.yml
- 运行
/trialtimer reload
? config.yml
# 冷却持续时间(单位:分钟)。支持小数(例如 0.5 = 30 秒)。
# 原版默认值:30 分钟
cooldown-minutes: 5.0
# 插件消息的语言。
# 可用选项:en, de
language: en
# 当试炼刷怪笼完成冷却时,向附近玩家发送广播消息。
broadcast:
enabled: true
radius: 64 # 以方块为单位
# 调试模式 —— 在控制台中记录每次冷却时间的修改。
debug: false
快速参考 —— 分钟 → 刻
| Minutes |
Seconds |
Ticks |
| 0.5 |
30s |
600 |
| 1 |
60s |
1,200 |
| 5 |
300s |
6,000 |
| 10 |
600s |
12,000 |
| 30 |
1800s |
36,000 (原版) |
? 命令
| Command |
Description |
Permission |
/trialtimer help |
显示命令概览 |
trialtimer.use |
/trialtimer info |
显示当前冷却时间 |
trialtimer.use |
/trialtimer reload |
重载配置 + 语言文件 |
trialtimer.reload |
别名: /tt
? 广播
当试炼刷怪笼完成冷却时,配置半径内的所有玩家都会收到一条消息:
[TrialTimer] A Trial Spawner at 42, 63, -128 is ready to fight again!
该消息可在语言文件中完全自定义(lang/messages_en.yml / lang/messages_de.yml)。
? PlaceholderAPI
TrialTimer 支持 PlaceholderAPI(可选 —— 即使不使用也能正常工作)。
| Placeholder |
Description |
%trialtimer_cooldown_minutes% |
配置的冷却时间(分钟) |
%trialtimer_cooldown_seconds% |
配置的冷却时间(秒) |
%trialtimer_cooldown_ticks% |
配置的冷却时间(刻) |
可在记分板、全息图或任何支持 PlaceholderAPI 的插件中使用这些占位符。
? 语言支持
TrialTimer 内置了英语和德语。
通过在 config.yml 中设置 language: de 进行切换。
语言文件保存在 plugins/TrialTimer/lang/ 目录下,可以自由编辑。
? 兼容性
| Software |
Supported |
| Paper 1.21.x - 26.x |
✅ |
| Purpur 1.21.x - 26.x |
✅ |
| Bukkit 26.x |
✅ |
| Spigot 26.x |
✅ |
| Folia 26.x |
✅ |
| PlaceholderAPI |
✅ (可选) |
注意: 版本 1.2.0 需要 Minecraft 26.x 和 Java 25。
对于 Minecraft 1.21.x(仅限 Paper/Purpur),请使用 TrialTimer 1.1.0。
如果遇到任何问题,请启用 debug: true —— 它会记录每次冷却时间的更改。
? 许可证
MIT —— 免费使用、分支及再分发。
⏱ TrialTimer
Configurable Trial Spawner cooldown — because 30 minutes is way too long.
? What does it do?
Vanilla Trial Spawners have a hardcoded 30-minute cooldown after a wave is completed.
TrialTimer lets you set that to whatever you want — down to a few seconds if needed.
No client-side mods required. Works fully server-side.
When a spawner finishes its cooldown, nearby players receive a broadcast message so they know it's ready to fight again.
⚙️ How does it work?
The 30-minute rule is hardcoded in Minecraft's source code, so datapacks can't touch it.
TrialTimer works around this by changing the spawner's cooldownEndsAt value:
when a spawner enters cooldown, the plugin overwrites it with your configured duration.
Minecraft then reads that value and considers the cooldown over — simple and clean.
- Paper / Purpur / Folia: uses the Bukkit API (
TrialSpawner#setCooldownEnd)
- Spigot: the API has no cooldown-end method, so the plugin automatically falls back to reflection
- Folia: the scan runs on the region schedulers
? Installation
- Make sure your server runs Minecraft 26.x and Java 25
- Drop
TrialTimer-x.x.x.jar into your plugins/ folder
- Restart the server
- Edit
plugins/TrialTimer/config.yml
- Run
/trialtimer reload
? config.yml
# Cooldown duration in minutes. Supports decimals (e.g. 0.5 = 30 seconds).
# Vanilla default: 30 minutes
cooldown-minutes: 5.0
# Language for plugin messages.
# Available: en, de
language: en
# Broadcast a message to nearby players when a Trial Spawner finishes its cooldown.
broadcast:
enabled: true
radius: 64 # in blocks
# Debug mode — logs every cooldown modification to the console.
debug: false
Quick reference — Minutes → Ticks
| Minutes |
Seconds |
Ticks |
| 0.5 |
30s |
600 |
| 1 |
60s |
1,200 |
| 5 |
300s |
6,000 |
| 10 |
600s |
12,000 |
| 30 |
1800s |
36,000 (vanilla) |
? Commands
| Command |
Description |
Permission |
/trialtimer help |
Shows command overview |
trialtimer.use |
/trialtimer info |
Shows current cooldown |
trialtimer.use |
/trialtimer reload |
Reloads config + language |
trialtimer.reload |
Alias: /tt
? Broadcast
When a Trial Spawner finishes its cooldown, all players within the configured radius receive a message:
[TrialTimer] A Trial Spawner at 42, 63, -128 is ready to fight again!
The message is fully customizable in the language files (lang/messages_en.yml / lang/messages_de.yml).
? PlaceholderAPI
TrialTimer supports PlaceholderAPI (optional — works without it too).
| Placeholder |
Description |
%trialtimer_cooldown_minutes% |
Configured cooldown in minutes |
%trialtimer_cooldown_seconds% |
Configured cooldown in seconds |
%trialtimer_cooldown_ticks% |
Configured cooldown in ticks |
Use these in scoreboards, holograms, or any plugin that supports PlaceholderAPI.
? Language Support
TrialTimer ships with English and German out of the box.
Switch via language: de in config.yml.
Language files are saved to plugins/TrialTimer/lang/ and can be edited freely.
? Compatibility
| Software |
Supported |
| Paper 1.21.x - 26.x |
✅ |
| Purpur 1.21.x - 26.x |
✅ |
| Bukkit 26.x |
✅ |
| Spigot 26.x |
✅ |
| Folia 26.x |
✅ |
| PlaceholderAPI |
✅ (optional) |
Note: Version 1.2.0 requires Minecraft 26.x and Java 25.
For Minecraft 1.21.x (Paper/Purpur only), use TrialTimer 1.1.0.
Enable debug: true if you run into issues — it logs every cooldown change.
? License
MIT — free to use, fork, and redistribute.
评论 0
登录后参与评分
还没有评论,来抢沙发吧