DiscordStatus
适用于 Paper/Purpur 26.3 — Java 25 — 版本 2.1.0
DiscordStatus 使用内置机器人(JDA——无需外部服务或 Webhook)将你的 Minecraft 服务器实时状态同步到 Discord。它保持一个持久化的状态嵌入消息(显示玩家数量、TPS、版本、IP、维护状态),在服务器启动、就绪、停止或进入/退出维护时发布生命周期消息,根据玩家数量更新机器人的在线状态,并在 Discord 中响应 /status 斜杠命令。
所有配置均通过 config.yml 完成——没有网页面板。
功能
- 持久化状态嵌入 —— 一条原地编辑的消息(避免频道刷屏),显示在线/最大玩家数、TPS、服务器版本和 IP。
- 生命周期消息 —— 启动、就绪、停止、开启维护和关闭维护事件会以可自定义的标题、描述和颜色发布到你的频道。
- 机器人在线状态 —— 机器人活动文本会反映当前玩家数量,更新间隔可配置。
- Discord
/status 斜杠命令 —— 任何成员都可以请求当前状态嵌入;它仅暴露已经公开的信息。
- 维护状态感知 —— 从名为
MaintenancePlugin 的辅助插件(或其 state.yml)读取维护状态,并发布相应的生命周期消息。
- 内置 Discord 机器人 —— JDA 已打包进 jar 文件;无需额外下载。
- 双语语言文件 —— 包含
en_US 和 pt_PT。
命令
| 命令 |
描述 |
权限 |
/discordstatus reload |
重新加载配置并重新连接机器人。 |
discordstatus.admin |
/discordstatus status |
强制更新持久化状态嵌入。 |
discordstatus.admin |
/discordstatus test |
发布一条测试用的“就绪”生命周期消息。 |
discordstatus.admin |
别名:/ds。Discord 侧的 /status 斜杠命令会在你的服务器中自动注册。
权限
| 节点 |
描述 |
默认值 |
discordstatus.admin |
允许管理 DiscordStatus 插件(重载、状态、测试)。 |
op |
设置 Discord 机器人
此插件需要你自己的 Discord 机器人应用程序。
- 访问 并创建一个新的应用程序。
- 向该应用程序添加一个 Bot 并复制其 token(令牌)。
- 邀请机器人加入你的服务器,并确保其拥有在目标频道查看和发送消息的权限。
- 在 Discord 中启用 开发者模式(用户设置 -> 高级),然后右键点击你的服务器和频道以复制它们的 ID。
你不需要启用“消息内容意图”——机器人从不读取消息内容,它只发布嵌入消息并更新其在线状态。请申请最低限度的权限。
保护你的 Token 私密性
你的机器人 token 赋予了对机器人的完全控制权。切勿将带有真实 token 的 config.yml 提交到 Git 或公开分享。 如果 token 泄露,请立即在 Discord 开发者门户中重置它。该插件永远不会记录 token,且仅提供占位符值。
配置
config.yml 中的重要键值:
bot:
# 在此粘贴你的机器人 token。保持此文件私密,不要纳入版本控制。
token: "YOUR_BOT_TOKEN_HERE"
guildId: "" # 你的 Discord 服务器 ID
channelId: "" # 用于生命周期 + 状态消息的频道 ID
server:
ip: "play.example.com" # 状态嵌入显示的 IP
features:
lifecycleMessages: true
statusEmbed: true
showTps: true
intervals:
presence: 30 # 更新在线状态的间隔(秒)
embed: 30 # 编辑状态嵌入的间隔(秒)
maintenancePoll: 3 # 检查维护状态的间隔(秒)
statusMessage:
mode: "EDIT_EXISTING" # EDIT_EXISTING 或 DELETE_AND_REPOST
presence:
# 占位符:{online}, {max}, {tps}, {server_ip}
template: "with {online}/{max} players"
embed:
title: "Server Status"
color: "#00FF00"
footer: "Last updated"
thumbnailUrl: ""
# 生命周期模板(启动 / 就绪 / 停止 / 开启维护 / 关闭维护)
# 支持占位符 {reason}, {server_ip}, {online}, {max}。
language: "en_US"
注意事项:
bot.token / guildId / channelId 是机器人连接所必需的。如果保留 token 为占位符,机器人将离线(服务器的其余部分正常运行)。
statusMessage.mode —— EDIT_EXISTING 保持单条消息持续更新(推荐);DELETE_AND_REPOST 每个周期删除并重新发布。
intervals —— 在线状态和嵌入更新的频率受到限制;请保持在几秒或更长时间,以符合 Discord 的频率限制。
- 每个嵌入和生命周期消息的标题、描述和颜色均可完全自定义。
安装
- 需要 Paper 或 Purpur 26.3 以及 Java 25(2.0.0 运行于 26.2,1.x 运行于 1.21.x)。
- 创建 Discord 机器人并复制其 token(见上方的“设置 Discord 机器人”)。
- 将
DiscordStatus.jar 放入服务器的 plugins/ 文件夹。
- 启动服务器一次以生成
config.yml。
- 填写
bot.token、bot.guildId、bot.channelId 和 server.ip,然后运行
/discordstatus reload。
依赖项
- 一个 Discord 机器人应用程序(必需)—— 你需要提供机器人 token;详见上方说明。
- JDA(内置)—— Discord 库已打包进 jar 文件;无需单独安装。
- MaintenancePlugin(可选)—— 检测名为
MaintenancePlugin 的插件(暴露 isMaintenanceEnabled() 方法),或 plugins/MaintenancePlugin/state.yml 文件。其他维护插件不会被检测。
支持 / 源码
源代码:
DiscordStatus
For Paper/Purpur 26.3 — Java 25 — Version 2.1.0
DiscordStatus bridges your Minecraft server's live status to Discord using a bundled bot
(JDA — no external service or webhook required). It keeps a single persistent status embed
(player count, TPS, version, IP, maintenance state), posts lifecycle messages when the server
starts, becomes ready, stops or enters maintenance, updates the bot's presence with the player
count, and answers a /status slash command in Discord.
Everything is configured from config.yml — there is no web panel.
Features
- Persistent status embed — one message that is edited in place (no channel spam) showing
online/max players, TPS, server version and IP.
- Lifecycle messages — starting, ready, stopping, maintenance-on and maintenance-off events
posted to your channel with customizable titles, descriptions and colors.
- Bot presence — the bot's activity text reflects the current player count on a configurable
interval.
- Discord
/status slash command — any member can request the current status embed; it only
exposes information that is already public.
- Maintenance awareness — reads maintenance state from a companion plugin named
MaintenancePlugin (or its state.yml) and posts the matching lifecycle message.
- Bundled Discord bot — JDA is shaded into the jar; no extra downloads.
- Bilingual language files —
en_US and pt_PT included.
Commands
| Command |
Description |
Permission |
/discordstatus reload |
Reload the configuration and reconnect the bot. |
discordstatus.admin |
/discordstatus status |
Force an update of the persistent status embed. |
discordstatus.admin |
/discordstatus test |
Post a test "ready" lifecycle message. |
discordstatus.admin |
Alias: /ds. The Discord-side /status slash command is registered automatically in your guild.
Permissions
| Node |
Description |
Default |
discordstatus.admin |
Allows managing the DiscordStatus plugin (reload, status, test). |
op |
Setting up the Discord bot
This plugin requires your own Discord bot application.
- Go to and create a new application.
- Add a Bot to the application and copy its token.
- Invite the bot to your server with permission to view and send messages in the target channel.
- Enable Developer Mode in Discord (User Settings -> Advanced), then right-click your server
and channel to copy their IDs.
You do not need to enable the Message Content Intent — the bot never reads message content,
it only posts embeds and updates its presence. Request the minimum privileges.
Keep your token private
Your bot token grants full control of the bot. Never commit config.yml with a real token to
Git or share it publicly. If a token is ever exposed, reset it immediately in the Discord
developer portal. The plugin never logs the token and ships with a placeholder value only.
Configuration
The important keys in config.yml:
bot:
# Paste your bot token here. Keep this file private and out of version control.
token: "YOUR_BOT_TOKEN_HERE"
guildId: "" # your Discord server ID
channelId: "" # the channel ID for lifecycle + status messages
server:
ip: "play.example.com" # the IP shown in the status embed
features:
lifecycleMessages: true
statusEmbed: true
showTps: true
intervals:
presence: 30 # seconds between presence updates
embed: 30 # seconds between status embed edits
maintenancePoll: 3 # seconds between maintenance-state checks
statusMessage:
mode: "EDIT_EXISTING" # EDIT_EXISTING or DELETE_AND_REPOST
presence:
# Placeholders: {online}, {max}, {tps}, {server_ip}
template: "with {online}/{max} players"
embed:
title: "Server Status"
color: "#00FF00"
footer: "Last updated"
thumbnailUrl: ""
# Lifecycle templates (starting / ready / stopping / maintenance-on / maintenance-off)
# support the placeholders {reason}, {server_ip}, {online}, {max}.
language: "en_US"
Notes:
bot.token / guildId / channelId are required for the bot to connect. Leaving the token
as the placeholder keeps the bot offline (the rest of the server runs normally).
statusMessage.mode — EDIT_EXISTING keeps a single message updated (recommended);
DELETE_AND_REPOST deletes and reposts each cycle.
intervals — presence and embed updates are throttled; keep them at a few seconds or more
to stay within Discord's rate limits.
- Titles, descriptions and colors of every embed and lifecycle message are fully customizable.
Installation
- Requires Paper or Purpur 26.3 and Java 25 (2.0.0 runs on 26.2, 1.x on 1.21.x).
- Create a Discord bot and copy its token (see "Setting up the Discord bot" above).
- Drop
DiscordStatus.jar into your server's plugins/ folder.
- Start the server once to generate
config.yml.
- Fill in
bot.token, bot.guildId, bot.channelId and server.ip, then run
/discordstatus reload.
Dependencies
- A Discord bot application (required) — you supply the bot token; see above.
- JDA (bundled) — the Discord library is shaded into the jar; no separate install.
- MaintenancePlugin (optional) — detects a plugin literally named
MaintenancePlugin exposing
isMaintenanceEnabled(), or a plugins/MaintenancePlugin/state.yml file. Other maintenance
plugins are not detected.
Support / Source
Source code:
评论 0
登录后参与评分
还没有评论,来抢沙发吧