![图片[1]-服务器定时重启器
自动重启计划
服务器重启调度
定时重启助手-PCI1](https://codefling.com/uploads/monthly_2024_01/PngItem_791285.png.7d476c2858ec771c5d4fda7ead0ebf55.png)
原创地址RebootScheduler – 插件 – Codefling
关于 RebootScheduler
特征
- 需要时重新启动服务器(SET_TIME 或 COOLDOWN)
- 当有可用更新时重新启动服务器(需要 UpdateNotice 插件)
依赖
这个插件需要 DISCORD 扩展才能工作!
与更新通知兼容,可在更新时重新启动
- 碳更新
- 氧化物更新
- 服务器更新
权限
- rebootscheduler.admin – 允许玩家使用插件命令
命令
- rs cancel – 取消正在进行的重启
- rs discord – 向 discord 发送测试消息
- rs help – 显示帮助消息
- rs restart <时间(以秒为单位>– 启动重启(如果没有给出时间,则为 10 秒)
- rs status – 显示当前重启状态
配置
默认配置:
{ "Default chat avatar": 0, "Enable UpdateNotice plugin (required for hooks)": true, "Hooks configuration (require UpdateNotice)": { "When the Server Restart (COOLDOWN | DAILY_TIME)": "COOLDOWN", "Cooldown time before restart (in seconds)": 300, "Enable restart OnCarbonUpdate": false, "Enable restart OnOxideUpdate": true, "Enable restart OnServerUpdate": true }, "Restart messages cooldown": [ 3600, 1800, 900, 300, 120, 60, 30, 10, 5, 4, 3, 2, 1 ], "Enable daily restart": false, "Daily restart time (13:30:00 as example for 1:30 pm UTC)": "04:00:00", "Daily restart cooldown (for message visibility)": 300, "Enable discord notifications": false, "Discord webhook url": "https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks", "Discord role id to mention (0 = no mention)": 0 }
- 默认聊天头像 – 用于聊天消息的头像的 SteamID
- 启用 UpdateNotice 插件(钩子需要) – 启用 UpdateNotice 插件钩子
- 钩子配置(需要 UpdateNotice) – UpdateNotice 插件钩子的配置
- 当服务器重新启动(COOLDOWN |DAILY_TIME) – 服务器何时应重新启动(触发挂钩)
- COOLDOWN – 达到冷却时间后重新开始
- DAILY_TIME – 在每日重启时间重启(即使未激活)
- 重启前的冷却时间(以秒为单位) – 重启前的冷却时间(仅当选择 **COOLDOWN** 时)
- 启用重启 OnCarbonUpdate – 在触发 CarbonUpdate 时启动重启
- 启用重启 OnOxideUpdate – 触发 OxideUpdate 时启动重启
- 启用重启 OnServerUpdate – 在触发 ServerUpdate 时启动重启
- 当服务器重新启动(COOLDOWN |DAILY_TIME) – 服务器何时应重新启动(触发挂钩)
- 重启消息冷却时间 – 聊天消息的冷却时间(以秒为单位)
- 启用每日重启 – 启用每日重启
- 每日重启时间(例如,UTC 下午 1:30 为 13:30:00)– 每日重启时间(以 UTC 为单位)
- 每日重启冷却时间(用于消息可见性)– 聊天消息的冷却时间(以秒为单位)
- 启用 discord 通知 – 启用 discord 通知(restartCancelled、restartInitiated、restartIminent)
- Discord Webhook url – Discord Webhook url (https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
- 要提及的 Discord 角色 ID (0 = 不提及) – 消息嵌入时提及的 Discord 角色 ID
地方化
默认本地化:
{ "Help": "\nCommands:\t\t\t\tExplanations:\n\n- rs cancel\t\t\t\tCancel the ongoing restart\n- rs discord\t\t\t\tSend a test message to discord\n- rs help\t\t\t\tDisplay the help message\n- rs restart <time in seconds>\t\tInitiate a restart (10s if no time given)\n- rs status\t\t\t\tDisplay the current restart status", "KickReason": "The server is restarting for update.", "NativeRestartCancel": "Native restart was cancelled.", "NoPermission": "You are not allowed to run this command!", "NoRestartOnGoing": "There is no restart on going!", "RestartCancelMessage": "The restart has been cancelled.", "RestartGlobalMessage": "The server is restarting in {0} due to {1}!", "RestartGlobalMessageShort": "The server is restarting in {0}!", "RestartInitialized": "Restart has been initialize.", "Status": "Status: {0}", "StatusWithTime": "Status: {0} - {1}", "UnknownCommand": "Unknown command!", "UpdateNoticeMissing": "The plugin \"UpdateMissing\" was not found. Check on UMod: https://umod.org/plugins/update-notice", "WrongNumberOfElements": "Wrong number of elements! Please check the help command.", "WrongTimeFormat": "Wrong time format! Please use \"hh:mm:ss\" for a planned time OR xxx (in seconds) for a cooldown" }
请确保保持 {x} 参数从 0 开始,并随升序递增!!
学分
灵感来自 SmoothRestarter
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END

















暂无评论内容