说明
DiscordStatus 是一款轻量级的 Minecraft 服务器插件,可将您游戏内服务器活动与您的 Discord 社区连接起来。它专为希望获得可靠且始终更新的 Discord 状态存在(presence),而无需手动发布更新的服务器所有者设计。
该插件将专用的 Discord 状态消息与您的服务器状态保持同步,以便玩家能立即看到服务器是处于在线还是离线状态。它还会报告玩家活动事件,使 Discord 成为您 Minecraft 服务器的实用配套空间。
核心功能
- 在 Discord 嵌入卡片中实时显示服务器在线/离线状态。
- 自动在 Discord 中发送玩家加入和离开通知。
- 可自定义在线和离线状态文本,包括:
- 可配置的嵌入部分,让每个服务器可以选择显示哪些内容:
- 描述
- 服务器图标缩略图
- MOTD(每日公告)
- 在线玩家数量
- 玩家列表
- 服务器版本
- 基于斜杠命令的管理方式,用于设置状态文本、颜色和开关,允许快速更新而无需频繁编辑文件。
为服务器所有者带来的便利
- 即使玩家不在游戏内,也能让他们实时了解社区动态。
- 减少 Discord 中重复的人工公告工作。
- 向玩家展示清晰且专业的服务器状态面板。
- 根据服务器风格和隐私偏好,精确定制可见的状态详情。
- 通过命令和配置快速管理展示效果和行为。
安装
安装插件 jar 包
- 从 Modrinth 下载最新版本。
- 将
DiscordStatus.jar 文件放入服务器的 plugins 文件夹中。
- 启动服务器一次以生成
plugins/DiscordStatus/config.yml。
创建 Discord 应用程序和机器人
- 打开 Discord 开发者门户:
- 点击“新建应用程序”并输入名称(例如
Status Bot)。
- 此时您应该处于可以配置应用程序的页面;如果不是,请点击刚才创建的应用程序。
- 转到左侧的“Bot”部分。
- 在 Token 下方,点击“重置令牌”(或“复制令牌”),然后将令牌粘贴到
plugins/DiscordStatus/config.yml 中 discordToken 的值里。
- 在同一应用程序的左侧导航中,进入 OAuth2 > OAuth2 URL Generator(OAuth2 URL 生成器)。
- 在 Scopes(作用域)下,选择:
bot
applications.commands
- 在 Bot Permissions(机器人权限)下,至少选择:
View Channels(查看频道)
Send Messages(发送消息)
Embed Links(嵌入链接)
Read Message History(读取消息历史)
Manage Messages(管理消息,用于刷新/替换状态消息时使用)
- 页面底部会生成一个 URL。打开生成的 URL 并将机器人邀请到您的服务器。
在 Discord 中启用开发者模式(用于复制 ID)
- 打开 Discord 设置。
- 进入 Advanced(高级)。
- 启用 Developer Mode(开发者模式)。
启用开发者模式后,右键点击并使用“复制服务器 ID”、“复制频道 ID”或“复制消息 ID”来填写 plugins/DiscordStatus/config.yml 中剩余的值。
discordServerID:右键点击您的服务器图标 > 复制服务器 ID
updatesChannelID:右键点击您的更新频道 > 复制频道 ID
statusChannelID:右键点击您的状态频道 > 复制频道 ID
statusMessageID:
- 首次运行时可选
- 您可以留空,让插件自动创建/存储它
- 如果稍后需要,右键点击状态消息 > 复制消息 ID
提示:如果您愿意,updatesChannelID 和 statusChannelID 可以是同一个频道。
最后步骤
- 配置
plugins/DiscordStatus/config.yml 的其余部分(默认文件模板见下文)。
- 重启 Minecraft 服务器以使更改生效。
- 享受这款 Minecraft 插件吧 :)
配置
默认 config.yml:
discordToken: "YOUR_BOT_TOKEN"
discordServerID: "YOUR_DISCORD_SERVER_ID"
updatesChannelID: "YOUR_DISCORD_CHANNEL_ID"
statusChannelID: "YOUR_STATUS_CHANNEL_ID"
statusMessageID: "YOUR_STATUS_MESSAGE_ID"
sendJoinMessage: true
sendLeaveMessage: true
joinMessage: "`{player}` joined the Server!"
leaveMessage: "`{player}` left the Server!"
statusMessageTitleOnline: "? Server is Online"
statusMessageDescriptionOnline: "The Minecraft server is currently online and operational."
statusColorOnline: "#00FF00"
statusMessageTitleOffline: "? Server is Offline"
statusMessageDescriptionOffline: "The Minecraft server is currently offline, please check again later."
statusColorOffline: "#FF0000"
showDescription: true
showServerIcon: true
showMotd: true
showPlayersOnline: true
showPlayerList: true
showServerVersion: true
phraseMessageOfTheDay: "Message of the Day"
phrasePlayersOnline: "Players Online"
phrasePlayerList: "Player List"
phraseNoPlayersOnline: "No players online."
phraseServerVersion: "Server Version"
phraseStatusUpdated: "Status Updated"
注意事项:
statusColorOnline 和 statusColorOffline 必须使用 #RRGGBB 格式。
statusMessageID 可以留空,插件会自动创建/更新它。
如果您喜欢这个项目,请考虑在 GitHub 上给它一个 Star!您的支持对我意义重大,也激励我继续构建和改进此类项目! :)
~ Sh4dowking
Description
DiscordStatus is a lightweight Minecraft server plugin that connects your ingame server activity with your Discord community. It is built for server owners who want a reliable and always updated Discord status presence without manually posting updates.
The plugin keeps a dedicated Discord status message synchronized with your server state, so players can immediately see whether the server is online or offline. It also reports player activity events, making Discord a practical companion space for your Minecraft server.
Core Features
- Live online/offline server status displayed in a Discord embed.
- Automatic player join and leave notifications in Discord.
- Customizable online and offline status text, including:
- status title
- status description
- embed color
- Configurable embed sections so each server can choose what to show:
- description
- server icon thumbnail
- MOTD
- online player count
- player list
- server version
- Slash-command based management for status text, colors, and toggles, allowing quick updates without constantly editing files.
What It Enables for Server Owners
- Keep your community informed in real time, even when they are not ingame.
- Reduce repetitive manual announcements in Discord.
- Present a clear and professional server status panel to players.
- Tailor exactly which status details are visible based on your server style and privacy preferences.
- Manage presentation and behavior quickly through commands and configuration.
Installation
Install the plugin jar
- Download the latest release from Modrinth.
- Place the
DiscordStatus.jar file in your server plugins folder.
- Start the server once to generate
plugins/DiscordStatus/config.yml.
Create a Discord application and bot
- Open the Discord Developer Portal:
- Click New Application and enter a name (for example
Status Bot).
- You should now be on a page where you can configure your Application, if not click on the Application you just created.
- Go to the Bot section on the left side.
- Under Token, click Reset Token (or Copy Token) then paste the token into the value of
discordToken in plugins/DiscordStatus/config.yml.
- In the same Application on the left side go to OAuth2 > OAuth2 URL Generator.
- Under Scopes, select:
bot
applications.commands
- Under Bot Permissions, select at least:
View Channels
Send Messages
Embed Links
Read Message History
Manage Messages (used when refreshing/replacing status messages)
- On the very bottom of the page a URL will be generated. Open the generated URL and invite the bot to your server.
Enable Developer Mode in Discord (for copying IDs)
- Open Discord Settings.
- Go to Advanced.
- Enable Developer Mode.
After Developer Mode is enabled, right-click and use Copy Server ID / Copy Channel ID / Copy Message ID to fill in the rest of the values in plugins/DiscordStatus/config.yml.
discordServerID: right-click your server icon > Copy Server ID
updatesChannelID: right-click your updates channel > Copy Channel ID
statusChannelID: right-click your status channel > Copy Channel ID
statusMessageID:
- optional on first run
- you can leave it empty and let the plugin create/store it automatically
- if needed later, right-click the status message > Copy Message ID
Tip: updatesChannelID and statusChannelID can be the same channel if you prefer.
Final Steps
- Configure the rest of the
plugins/DiscordStatus/config.yml (A default file template can be found below).
- Restart the Minecraft Server for the changes to take effect.
- Enjoy the Minecraft Plugin :)
Configuration
Default config.yml:
discordToken: "YOUR_BOT_TOKEN"
discordServerID: "YOUR_DISCORD_SERVER_ID"
updatesChannelID: "YOUR_DISCORD_CHANNEL_ID"
statusChannelID: "YOUR_STATUS_CHANNEL_ID"
statusMessageID: "YOUR_STATUS_MESSAGE_ID"
sendJoinMessage: true
sendLeaveMessage: true
joinMessage: "`{player}` joined the Server!"
leaveMessage: "`{player}` left the Server!"
statusMessageTitleOnline: "? Server is Online"
statusMessageDescriptionOnline: "The Minecraft server is currently online and operational."
statusColorOnline: "#00FF00"
statusMessageTitleOffline: "? Server is Offline"
statusMessageDescriptionOffline: "The Minecraft server is currently offline, please check again later."
statusColorOffline: "#FF0000"
showDescription: true
showServerIcon: true
showMotd: true
showPlayersOnline: true
showPlayerList: true
showServerVersion: true
phraseMessageOfTheDay: "Message of the Day"
phrasePlayersOnline: "Players Online"
phrasePlayerList: "Player List"
phraseNoPlayersOnline: "No players online."
phraseServerVersion: "Server Version"
phraseStatusUpdated: "Status Updated"
Notes:
statusColorOnline and statusColorOffline must use #RRGGBB format.
statusMessageID can be left empty, the plugin will create/update it automatically.
If you like this project, please consider giving it a star on GitHub! Your support means the world to me and motivates me to keep building and improving projects like this! :)
~ Sh4dowking
评论 0
登录后参与评分
还没有评论,来抢沙发吧