插件简介
本插件在服务器端运行,扩展了 /schedule 命令树:
/schedule
\
-function
\
-<function>
\
-realtime
\
|-<magnitude>
| \
| -(ms|s|min|h|d|a)
| \
| -[(append|replace)]
\
-at
\
-<time>
\
-[(append|replace)]
使用方法
加载一个正在运行此插件的世界,并加载一些数据包函数,然后你可以使用以下命令:
- 临时实时调度
/schedule function funct1 realtime 800 ms append - 追加一个将在 800 毫秒后执行的 funct1 调度
/schedule function funct2 realtime 10.5 s - 清除 funct2 的所有临时实时调度,并追加一个将在 10.5 秒后执行的 funct2 调度
/schedule function #tag1 realtime 3.14 min replace - 清除 #tag1 的所有临时实时调度,并追加一个将在 3.14 分钟后执行的 #tag1 调度
/schedule function #tag2 realtime 0.9 h append - 追加一个将在 0.9 小时后执行的 #tag2 调度
/schedule function funct3 realtime 1 d - 清除 funct3 的所有临时实时调度,并追加一个将在 1 天后执行的 funct3 调度
/schedule function funct4 realtime 0.25 a replace - 清除 funct4 的所有临时实时调度,并追加一个将在 0.25 儒略年后执行的 funct4 调度
- 持久实时调度
/schedule function #tag3 realtime at "18:30" append - 追加一个将在“今天”18:30 执行的 #tag3 调度
/schedule function #tag4 realtime at "24:30" - 清除 #tag4 的所有持久实时调度,并追加一个将在“明天”00:30 执行的 #tag4 调度
/schedule function funct5 realtime at "12:34:56" replace - 清除 funct5 的所有持久实时调度,并追加一个将在“今天”12:34:56 执行的 funct5 调度
/schedule function funct6 realtime at "03-14 15:09:26" append 或 /schedule function funct6 realtime at "14/3 15:09:26" - 追加一个将在“今年”3月14日 15:09:26 执行的 funct6 调度
/schedule function #tag5 realtime at "2025-06-07 00:00:00" 或 /schedule function #tag5 realtime at "7/6/2025 00:00:00" - 清除 #tag5 的所有持久实时调度,并追加一个将在 2025年6月7日 00:00:00 执行的 #tag5 调度
所有未执行的临时实时调度将在服务器停止时被丢弃。所有未执行的持久实时调度将在世界保存时保存到世界根目录下的 realtime-schedules.json 文件中。如果某个持久实时调度的执行时间早于当前时间,它将立即执行。即使游戏被 /tick freeze 冻结或暂停(单人模式),实时调度仍会执行。
许可证与源代码
本项目的 Fabric 版本采用 GNU 宽通用公共许可证第 3 版 (LGPL-3.0)。其源代码仓库:
本项目的 Spigot 版本采用 GNU 通用公共许可证第 3 版 (GPL-3.0)。其源代码仓库:
由于 Modrinth 的限制,页面只能显示一个许可证(LGPL-3.0-or-later)和一个源代码链接。
已知问题
Spigot 平台
- 执行
/bukkit:reload 可能会导致此插件出现 java.lang.IllegalStateException: zip file closed 错误而失效。
Plugin Synopsis
This plugin runs on server-side, expands the command tree of /schedule:
/schedule
\
-function
\
-<function>
\
-realtime
\
|-<magnitude>
| \
| -(ms|s|min|h|d|a)
| \
| -[(append|replace)]
\
-at
\
-<time>
\
-[(append|replace)]
How to Use This Plugin
Load a world with this plugin running, and load some data pack functions, then you can use the command:
- Temporary realtime schedules
/schedule function funct1 realtime 800 ms append - Append a schedule of funct1 that will be executed after 800 milliseconds
/schedule function funct2 realtime 10.5 s - Clear all temporary realtime schedules of funct2 and append a schedule of funct2 that will be executed after 10.5 seconds
/schedule function #tag1 realtime 3.14 min replace - Clear all temporary realtime schedules of #tag1 and append a schedule of #tag1 that will be executed after 3.14 minutes
/schedule function #tag2 realtime 0.9 h append - Append a schedule of #tag2 that will be executed after 0.9 hours
/schedule function funct3 realtime 1 d - Clear all temporary realtime schedules of funct3 and append a schedule of funct3 that will be executed after 1 day
/schedule function funct4 realtime 0.25 a replace - Clear all temporary realtime schedules of funct4 and append a schedule of funct4 that will be executed after 0.25 Julian years
- Persistent realtime schedules
/schedule function #tag3 realtime at "18:30" append - Append a schedule of #tag3 that will be executed at 18:30 “today”
/schedule function #tag4 realtime at "24:30" - Clear all persistent realtime schedules of #tag4 and append a schedule of #tag4 that will be executed at 00:30 “tomorrow”
/schedule function funct5 realtime at "12:34:56" replace - Clear all persistent realtime schedules of funct5 and append a schedule of funct5 that will be executed at 12:34:56 “today”
/schedule function funct6 realtime at "03-14 15:09:26" append or /schedule function funct6 realtime at "14/3 15:09:26" - Append a schedule of funct6 that will be executed at 15:09:26 March 14 “this year”
/schedule function #tag5 realtime at "2025-06-07 00:00:00" or /schedule function #tag5 realtime at "7/6/2025 00:00:00" - Clear all persistent realtime schedules of #tag5 and append a schedule of #tag5 that will be executed at 00:00:00 June 7, 2025
All unexecuted temporary realtime schedules will be discarded on server stopping. All unexecuted persistent realtime schedules will be saved to realtime-schedules.json at the root directory of the world on world saving. If a persistent realtime schedule has a execute time before the current time, it will be immediately executed. Realtime schedules will be executed even if the game is frozen by /tick freeze or paused (singleplayer).
License and Source Code
The Fabric version of this project is under GNU Lesser Generic Public License version 3. Its source code repository:
The Spigot version of this project is under GNU Generic Public License version 3. Its source code repository:
Due to Modrinth's limitation, the page can only show one license (LGPL-3.0-or-later) and one source link.
Known Issues
Spigot Platform
- Executing
/bukkit:reload can break this plugin with java.lang.IllegalStateException: zip file closed.
评论 0
登录后参与评分
还没有评论,来抢沙发吧