RWR-Discord Webhook
为 ResourceWorldResetter 提供 Discord Webhook 通知——在管理员工具频道中重置警告和结果,无需使用 Discord 机器人。
为什么使用它
- 预知重置 — 配置好的 RWR 警告阈值会在资源世界再生之前发布到 Discord
- 查看最终结果 — 成功、失败、取消或在重启或崩溃后中断
- 有目的地提及工作人员 — 可选的白名单角色和用户提及;默认关闭
- 保持服务器运行流畅 — HTTP 投递不会占用 Bukkit 和 Folia 服务器线程
- 抵御 Discord 波动 — 待处理的消息会在重启后重试并恢复
- 将 Webhook 密钥远离队列文件 — URL 在日志中被脱敏,且从不存储在持久队列中
- 一个 jar 包 适用于 Spigot、CraftBukkit、Paper、Purpur 和 Folia
- 无需 RWR 即可加载 — 插件保持启用状态;仅在
RwrApi 可用时转发重置事件
功能
通知
- 警告嵌入:世界 ID、世界名称、剩余时间、计划重置时间
- 终端嵌入:操作 ID、阶段、故障类型、安全分类和详细信息
- 启动或重载后的配置确认(RWR API 状态、插件版本、服务器)
- 中间重置阶段不会发送
- 可独立切换警告、成功、失败、取消和中断事件
- 按类别设置嵌入颜色
投递
- HTTPS 帖子发送到您配置的 Discord 传入 Webhook (
discord.com / discordapp.com)
- 持久队列(最多 500 条条目,24 小时 TTL,最多 8 次尝试)
- 遵守 HTTP 429 上的 Discord
Retry-After
- 自定义 Webhook 用户名和头像
- 留空
webhook.url 以禁用投递
提及和语言
- 在您启用并列出 Discord 角色/用户 ID 之前,提及功能处于关闭状态
- 本地化字符串和 RWR 事件文本经过 sanitization(净化),无法触发提及
- 自有本地化文件 (
locale: en_US, locales/<code>.yml,英文回退)
此插件仅支持 Webhook。它不使用 Discord 机器人令牌,不连接到 Discord Gateway,也不读取频道或成员。
入门指南
- 为您的服务器安装 ResourceWorldResetter(Spigot / CraftBukkit → Spigot jar,Paper / Purpur / Folia → Paper-Folia jar)。
- 将此插件的 jar 放入
plugins/ 目录并启动服务器一次。
- 在
plugins/RWR-Discord-Webhook/config.yml 中设置 webhook.url。
- 重载,然后检查状态。
/rwrdiscord reload
/rwrdiscord status
如果 ResourceWorldResetter 提供了 /rwr discord 命令,则推荐使用该写法(/rwr discord reload, /rwr discord status)。别名:rwr-discord, rwr-discord-webhook, rwrwh。权限:rwrdiscord.admin(默认:op)。
webhook:
url: "https://discord.com/api/webhooks/..."
要求
- Java 21+
- Minecraft 1.21+ (
api-version 1.21)
- Spigot, CraftBukkit, Paper, Purpur 或 Folia
- ResourceWorldResetter 5.1+ 用于重置通知
- 一个 Discord 传入 Webhook
附加组件 / 集成
- ResourceWorldResetter — 重置事件所必需。安装与您的服务器匹配的 RWR jar;您不需要安装单独的 API jar。
- Discord 传入 Webhooks — 唯一的 Discord 集成方式
指标
此插件使用 bStats(插件 ID 33788)进行匿名服务器使用统计,例如服务器软件版本、在线玩家数量和插件版本。
bStats 不会接收 Webhook URL、Discord 消息内容、世界或操作标识符或玩家身份。
如需退出,请在 plugins/bStats/config.yml 中设置:
enabled: false
该文件由 bStats 控制,而非本插件的 config.yml。
链接
版权所有:Lozaine@TamaWish · BSD 3-Clause
RWR-Discord Webhook
Discord webhook notifications for ResourceWorldResetter — reset warnings and outcomes in your staff channel, without a Discord bot.
Why use it
- See resets coming — configured RWR warning thresholds post to Discord before a resource world regenerates
- See how they finished — success, failure, cancellation, or interrupted after a restart or crash
- Ping staff on purpose — optional role and user mentions from an allow-list; off by default
- Keep the server moving — HTTP delivery stays off the Bukkit and Folia server thread
- Survive Discord blips — pending messages retry and resume after a restart
- Keep webhook secrets off the queue file — URLs are redacted from logs and never stored in the durable queue
- One jar for Spigot, CraftBukkit, Paper, Purpur, and Folia
- Loads without RWR — the add-on stays enabled; reset events are forwarded only when
RwrApi is available
Features
Notifications
- Warning embeds: world ID, world name, time remaining, scheduled reset time
- Terminal embeds: operation ID, phase, failure type, safety classification, and detail message
- Configuration confirmation after startup or reload (RWR API status, add-on version, server)
- Intermediate reset phases are never sent
- Toggle warnings, success, failures, cancellations, and interrupted events independently
- Per-category embed colors
Delivery
- HTTPS posts to a Discord incoming webhook you configure (
discord.com / discordapp.com)
- Durable queue (up to 500 entries, 24-hour TTL, up to 8 attempts)
- Honors Discord
Retry-After on HTTP 429
- Custom webhook username and avatar
- Leave
webhook.url empty to disable delivery
Mentions and language
- Mentions stay off until you enable them and list Discord role/user IDs
- Locale strings and RWR event text are sanitized so they cannot ping
- Own locale files (
locale: en_US, locales/<code>.yml, English fallback)
This plugin is webhook-only. It does not use a Discord bot token, does not connect to the Discord Gateway, and does not read channels or members.
Getting started
- Install ResourceWorldResetter for your server (Spigot / CraftBukkit → Spigot jar, Paper / Purpur / Folia → Paper-Folia jar).
- Place this plugin’s jar in
plugins/ and start the server once.
- Set
webhook.url in plugins/RWR-Discord-Webhook/config.yml.
- Reload, then check status.
/rwrdiscord reload
/rwrdiscord status
If ResourceWorldResetter exposes /rwr discord, that is the preferred wording (/rwr discord reload, /rwr discord status). Aliases: rwr-discord, rwr-discord-webhook, rwrwh. Permission: rwrdiscord.admin (default: op).
webhook:
url: "https://discord.com/api/webhooks/..."
Requirements
- Java 21+
- Minecraft 1.21+ (
api-version 1.21)
- Spigot, CraftBukkit, Paper, Purpur, or Folia
- ResourceWorldResetter 5.1+ for reset notifications
- A Discord incoming webhook
Addons / integrations
- ResourceWorldResetter — required for reset events. Install the RWR jar that matches your server; you do not install a separate API jar.
- Discord incoming webhooks — the only Discord integration
Metrics
This plugin uses bStats (plugin ID 33788) for anonymous server usage statistics, such as server software version, online player count, and plugin version.
bStats does not receive webhook URLs, Discord message content, world or operation identifiers, or player identities.
Opt out in plugins/bStats/config.yml:
enabled: false
That file is controlled by bStats, not this plugin’s config.yml.
Links
Copyright: Lozaine@TamaWish · BSD 3-Clause
评论 0
登录后参与评分
还没有评论,来抢沙发吧