MinecraftStateMessages
一款强大的 Minecraft 服务器插件,通过自定义嵌入(Embed)将实时服务器状态通知发送到 Discord。
功能 • 安装 • 配置 • 支持
? 功能
- ? 实时通知 - 服务器启动或停止时即时发送 Discord 通知
- ? 自定义嵌入 - 美观且完全可定制的 Discord 嵌入,支持颜色编码
- ? 灵活配置 - 易于使用的 YAML 配置文件,带有合理的默认值
- ? 轻量级 - 对服务器性能影响极小
? 安装
- 从 发布页面 下载最新的
MinecraftStateMessages.jar
- 将 JAR 文件放入服务器的
plugins/ 目录中
- 重启服务器
- 通过编辑
plugins/MinecraftStateMessages/config.yml 配置插件
- 运行
/reload 或重启服务器以应用更改
⚙️ 配置
首次运行后,会在 plugins/MinecraftStateMessages/ 目录下生成一个 config.yml 文件。以下是所有配置选项的详细说明:
基本设置
# 服务器启动时发送到 Discord 的消息
server-start-message: "Server has been started!"
# 服务器停止时发送到 Discord 的消息
server-stop-message: "Server has been stopped!"
# 你的 Discord Webhook URL - 请从 Discord 服务器设置 > 集成 > Webhooks 获取
discord-webhook-url: "https://discord.com/api/webhooks/your-webhook-url"
嵌入设置
# 启用或禁用 Discord 嵌入(如果为 false,则发送纯文本消息)
embed-enabled: true
# 服务器启动通知的颜色
# 支持:green, red, blue, yellow, orange, purple, gray/grey, black, white
# 或使用十六进制代码:"#2ECC71" 或 "2ECC71"
embed-start-color: "green"
# 服务器停止通知的颜色
embed-stop-color: "red"
# 显示在嵌入顶部的标题
# 留空("")以完全隐藏标题
embed-title: "Minecraft Server"
? 颜色参考
| 颜色名称 |
十六进制代码 |
预览 |
green |
#2ECC71 |
? 适合启动消息 |
red |
#E74C3C |
? 适合停止消息 |
blue |
#3498DB |
? 一般信息 |
yellow |
#FFFF00 |
? 警告 |
orange |
#E67E22 |
? 警报 |
purple |
#9B59B6 |
? 特殊事件 |
gray/grey |
#95A5A6 |
⚪ 中性 |
black |
#23272A |
⚫ Discord 深色主题 |
white |
#FFFFFF |
⚪ 亮色 |
你也可以使用任何自定义十六进制颜色:
embed-start-color: "#FF6B6B" # 自定义珊瑚红
embed-stop-color: "4ECDC4" # 自定义绿松石色(# 可选)
配置示例
示例 1:最小化设置(无标题)
server-start-message: "✅ Server Online"
server-stop-message: "❌ Server Offline"
discord-webhook-url: "https://discord.com/api/webhooks/123456789/abcdefg"
embed-enabled: true
embed-start-color: "green"
embed-stop-color: "red"
embed-title: "" # 为空 = 不显示标题
示例 2:品牌化服务器
server-start-message: "? The server is now online and ready for players!"
server-stop-message: "? The server is now offline for maintenance."
discord-webhook-url: "https://discord.com/api/webhooks/123456789/abcdefg"
embed-enabled: true
embed-start-color: "#00FF00"
embed-stop-color: "#FF0000"
embed-title: "? AwesomeCraft Network"
示例 3:简单文本消息(无嵌入)
server-start-message: "[SERVER] Started successfully!"
server-stop-message: "[SERVER] Shutting down..."
discord-webhook-url: "https://discord.com/api/webhooks/123456789/abcdefg"
embed-enabled: false # 发送纯文本而非嵌入
embed-start-color: "green"
embed-stop-color: "red"
embed-title: ""
? 设置 Discord Webhook
- 打开你的 Discord 服务器
- 进入 服务器设置 → 集成 → Webhooks
- 点击 新建 Webhook 或 创建 Webhook
- 自定义 Webhook 名称和频道
- 点击 复制 Webhook URL
- 将 URL 粘贴到 config.yml 中的
discord-webhook-url
?️ 高级用法
标题可见性
embed-title 字段具有特殊行为:
多个 Webhook(高级)
想要将通知发送到多个 Discord 频道?你可以动态修改 Webhook URL 或创建多个配置。对于高级设置,建议分叉此插件并添加多 Webhook 支持。
? 故障排除
Webhook 未发送
问题:Discord 中没有出现消息
解决方案:
- ✅ 验证你的 Webhook URL 是否正确
- ✅ 确保
discord-webhook-url 没有设置为默认的占位符
- ✅ 检查服务器控制台是否有错误消息
- ✅ 确认该 Webhook 没有在 Discord 中被删除
- ✅ 使用 webhook.site 等工具测试 Webhook URL
颜色不起作用
问题:嵌入显示错误的颜色或没有颜色
解决方案:
- ✅ 使用支持的颜色名称(参见 颜色参考)
- ✅ 如果使用十六进制代码,请确保格式正确:
"#FF0000" 或 "FF0000"
- ✅ 更改颜色后重新加载插件
标题在不应该显示时显示了
问题:即使设置为空,标题仍然出现
解决方案:
- ✅ 确保
embed-title: "" 完全如此(空引号)
- ✅ 移除引号之间的任何空格:❌
" " → ✅ ""
- ✅ 配置更改后重新加载/重启服务器
? 支持与链接
获取帮助 & 保持联系
? 权限
本插件无需任何特殊权限。它仅需要:
- 文件系统访问权限以进行配置管理
- 网络访问权限以发送 webhook 请求
? 许可证
本项目采用 MIT 许可证授权 - 详情请参阅 LICENSE 文件。
? 鸣谢
由 gglvxd 用 ❤️ 开发
MinecraftStateMessages
? Features
- ? Real-time Notifications - Instant Discord notifications when your server starts or stops
- ? Customizable Embeds - Beautiful, fully customizable Discord embeds with color coding
- ? Flexible Configuration - Easy-to-use YAML configuration with sensible defaults
- ? Lightweight - Minimal performance impact on your server
? Installation
- Download the latest
MinecraftStateMessages.jar from the releases page
- Place the JAR file in your server's
plugins/ directory
- Restart your server
- Configure the plugin by editing
plugins/MinecraftStateMessages/config.yml
- Run
/reload or restart the server to apply changes
⚙️ Configuration
After the first run, a config.yml file will be generated in plugins/MinecraftStateMessages/. Here's a detailed breakdown of all configuration options:
Basic Settings
# Message sent to Discord when the server starts
server-start-message: "Server has been started!"
# Message sent to Discord when the server stops
server-stop-message: "Server has been stopped!"
# Your Discord webhook URL - get this from Discord Server Settings > Integrations > Webhooks
discord-webhook-url: "https://discord.com/api/webhooks/your-webhook-url"
Embed Settings
# Enable or disable Discord embeds (if false, sends plain text messages)
embed-enabled: true
# Color for server start notifications
# Supported: green, red, blue, yellow, orange, purple, gray/grey, black, white
# Or use hex codes: "#2ECC71" or "2ECC71"
embed-start-color: "green"
# Color for server stop notifications
embed-stop-color: "red"
# Title displayed at the top of the embed
# Leave empty ("") to hide the title completely
embed-title: "Minecraft Server"
? Color Reference
| Color Name |
Hex Code |
Preview |
green |
#2ECC71 |
? Perfect for start messages |
red |
#E74C3C |
? Perfect for stop messages |
blue |
#3498DB |
? General information |
yellow |
#FFFF00 |
? Warnings |
orange |
#E67E22 |
? Alerts |
purple |
#9B59B6 |
? Special events |
gray/grey |
#95A5A6 |
⚪ Neutral |
black |
#23272A |
⚫ Discord dark theme |
white |
#FFFFFF |
⚪ Bright |
You can also use any custom hex color:
embed-start-color: "#FF6B6B" # Custom coral red
embed-stop-color: "4ECDC4" # Custom turquoise (# is optional)
Configuration Examples
Example 1: Minimal Setup (No Title)
server-start-message: "✅ Server Online"
server-stop-message: "❌ Server Offline"
discord-webhook-url: "https://discord.com/api/webhooks/123456789/abcdefg"
embed-enabled: true
embed-start-color: "green"
embed-stop-color: "red"
embed-title: "" # Empty = no title shown
Example 2: Branded Server
server-start-message: "? The server is now online and ready for players!"
server-stop-message: "? The server is now offline for maintenance."
discord-webhook-url: "https://discord.com/api/webhooks/123456789/abcdefg"
embed-enabled: true
embed-start-color: "#00FF00"
embed-stop-color: "#FF0000"
embed-title: "? AwesomeCraft Network"
Example 3: Simple Text Messages (No Embeds)
server-start-message: "[SERVER] Started successfully!"
server-stop-message: "[SERVER] Shutting down..."
discord-webhook-url: "https://discord.com/api/webhooks/123456789/abcdefg"
embed-enabled: false # Sends plain text instead of embeds
embed-start-color: "green"
embed-stop-color: "red"
embed-title: ""
? Setting Up Discord Webhook
- Open your Discord server
- Go to Server Settings → Integrations → Webhooks
- Click New Webhook or Create Webhook
- Customize the webhook name and channel
- Click Copy Webhook URL
- Paste the URL into
discord-webhook-url in your config.yml
?️ Advanced Usage
Title Visibility
The embed-title field has special behavior:
Multiple Webhooks (Advanced)
Want to send notifications to multiple Discord channels? You can modify the webhook URL dynamically or create multiple configurations. For advanced setups, consider forking this plugin and adding multi-webhook support.
? Troubleshooting
Webhook not sending
Problem: No messages appear in Discord
Solutions:
- ✅ Verify your webhook URL is correct
- ✅ Ensure
discord-webhook-url is not set to the default placeholder
- ✅ Check server console for error messages
- ✅ Confirm the webhook hasn't been deleted in Discord
- ✅ Test the webhook URL using a tool like webhook.site
Colors not working
Problem: Embeds show wrong colors or no color
Solutions:
- ✅ Use supported color names (see Color Reference)
- ✅ If using hex codes, ensure format is correct:
"#FF0000" or "FF0000"
- ✅ Reload the plugin after changing colors
Title showing when it shouldn't
Problem: Title appears even when set to empty
Solutions:
- ✅ Ensure
embed-title: "" is exactly like this (empty quotes)
- ✅ Remove any spaces between quotes: ❌
" " → ✅ ""
- ✅ Reload/restart server after config changes
? Support & Links
Get Help & Stay Connected
- ? Support Server: dsc.gg/gglvxd - Get help, report bugs, or suggest features
- ?? Developer: gglvxd.net - Visit the developer's website
- ? Organization: Fryde - Powered by Fryde
? Permissions
This plugin requires no special permissions. It only needs:
- File system access for config management
- Network access for webhook requests
? License
This project is licensed under the MIT License - see the LICENSE file for details.
? Credits
Developed with ❤️ by gglvxd
Made with ? by gglvxd | Powered by Fryde
If you like this plugin, consider giving it a ⭐ and joining our Discord!
评论 0
登录后参与评分
还没有评论,来抢沙发吧