ScheduleCommand —— 高度自定义的定时命令插件🍘支持 Papi 变量 [1.12.X~1.21.X]

原创 工具 脚本 ScheduleCommand —— 高度自定义的定时命令插件🍘支持 Papi 变量 [1.12.X~1.21.X] 1.0.3

Source of resources
Original
插件中文名称
定时命令
插件英文名称
ScheduleCommand
原帖地址
#
支持的核心(服务端)
  1. Spigot
  2. Paper
  3. Purpur
  4. PufferFish
  5. Leaves
  6. 其他核心
Language
Multi-language
适配版本(Java)
  1. 1.21
  2. 1.20
  3. 1.19
  4. 1.18
  5. 1.17
  6. 1.16
  7. 1.15
  8. 1.14
  9. 1.13
  10. 1.12

插件简介

  • 高度自定义的定时命令执行插件。支持多种触发方式,包括日期、时间、循环等多种模式。
  • 兼容 PlaceholderAPI 和指令组内延迟执行。
  • 如果有任何问题或者建议,可以加入官方群 1104261361 进行反馈。

可选模式

  • date:指定在某个日期执行一次命令。
  • time:指定在一天内的某个时间执行一次命令。
  • cycle:每格一段时间循环执行命令。
  • week:指定在一周内的某一天执行一次命令。

拓展语法

  • 变量:支持 PlaceholderAPI 变量,例如 %server_tps%
  • 延迟:支持使用 delay: <秒数> 延迟执行命令,例如 delay: 10

指令权限

  • /schedule - 重新加载配置文件 - schedule.reload

使用示例

YAML:
# Message language
# Options: CN, EN
# If not specified, default is CN
language: CN

# 自定义名称
schedule_1:
  # 是否启用,可忽略,默认启用
  enabled: true
  # 任务类型,可选:date、time、cycle、week
  model: "date"
  # 类型参数
  value: "2077-01-08"
  # 执行的命令
  commands:
    - "say 日期定时任务运行成功"
    # 支持延迟执行,单位秒
    - "delay: 10"
    # 支持 PlaceholderAPI
    - "say %server_tps%"

# 日期
schedule_2:
  enabled: true
  # 指定日期
  model: "date"
  # 2077年1月8日 执行一次
  value: "2077-01-08"
  commands:
    - "say 日期定时任务运行成功"

# 时间
schedule_3:
  enabled: true
  # 指定时间
  model: "time"
  # 每天 13点53分 执行一次
  value: "13:53"
  commands:
    - "say 时间定时任务运行成功"

# 循环
schedule_4:
  enabled: true
  # 循环
  model: "cycle"
  # 每隔 5 秒执行一次
  value: "5"
  commands:
    - "say 循环定时任务运行成功"

# 星期
schedule_5:
  enabled: true
  # 星期
  model: "week"
  # 每周三执行一次
  value: "3"
  commands:
    - "say 每周三定时任务运行成功"
  • Like
Reactions: 冬蝶空
Author
PuddingKC
Downloads
81
Views
367
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from PuddingKC

Share this resource

Latest updates

  1. 更新至 1.0.3

    修复 delay 方法执行顺序问题。 修复重载时不会结束已创建的延迟进程问题。
  2. 更新至 1.0.2

    修复权限错误

Latest reviews

不错啊,把我的想法做出来了