? DiscordIncorporation
DiscordIncorporation 是一款适用于 Spigot/Paper 的 Minecraft 插件,可将你的服务器与 Discord 集成。它支持双向聊天、从 Discord 远程执行命令、控制台命令捕获以及将日志发送到 Discord 频道。
✨ 功能特性
- ? Minecraft 与 Discord 之间的双向聊天
- ⚡ 使用指定角色从 Discord 执行服务器命令
- ?️ 捕获所有控制台命令并将其发送到 Discord 频道
- ? Discord 中的
/online 命令可查看在线玩家
- ?
/discordinc reload 命令可在不重启服务器的情况下重载配置
- ? 消息内容可在
messages.yml 中自定义(支持西班牙语和英语)
?️ 运行环境
- Minecraft 1.17 - 1.20 (Paper/Spigot)
- Java 16+(推荐 Java 22)
- Discord Bot(需自有 Token)
- 插件已包含 JDA 库
? 安装步骤
- 下载
.jar 文件并将其放入服务器的 plugins 文件夹中。
- 重启服务器以生成默认配置文件。
- 配置
config.yml:
bot-token: "YOUR_BOT_TOKEN"
log-channel-id: "DISCORD_CHANNEL_ID"
allowed-roles:
- "Admin"
- "Moderator"
可选:在 messages.yml 中自定义消息,以启用/禁用消息、设置聊天格式及权限提示。
? 创建 Discord Bot
-
前往 Discord Developer Portal(开发者门户)并创建一个新应用。
-
在 Bot 部分创建机器人并复制其 Token。
-
在 Privileged Gateway Intents(特权网关意图)中启用 Server Members Intent(服务器成员意图)。
-
使用 OAuth2 URL Generator(OAuth2 URL 生成器)将机器人邀请到你的服务器:
-
Scopes(范围):bot 和 applications.commands
-
Bot Permissions(机器人权限):Send Messages(发送消息)、Read Message History(读取消息历史)、Administrator(管理员,可选)
-
将 Token 粘贴到 config 配置文件中。
? 使用方法
Minecraft 命令
/discordinc reload
重载插件配置及消息。
Discord 斜杠命令
/online → 显示在线玩家
/cmd command:<text> → 从 Discord 执行 Minecraft 命令(需要拥有允许的权限角色)
⚙️ 可配置消息 (messages.yml)
plugin-enabled-es, plugin-enabled-en → 插件启用时的消息
plugin-disabled-es, plugin-disabled-en → 插件禁用时的消息
chat-mc-format → 发送至 Discord 的 Minecraft 消息格式
chat-discord-format → 发送至 Minecraft 的 Discord 消息格式
no-permission → 角色无权限时的提示消息
⚠️ 注意事项
请确保使用有效的 Discord Token。
妥善保管 Token;若泄露,他人可能控制你的机器人。
如果你的服务器处于 offline-mode(离线模式),任何人都可以在无需 Mojang 验证的情况下加入(这并不直接影响 Discord 插件,但存在安全风险)。
? 致谢
插件由 [YourName] 开发
灵感来源于 Minecraft 的 Discord 集成方案
使用的库:JDA
? 许可证
MIT License —— 你可以根据许可条款进行修改和重新分发。
享受你的 Discord ↔ Minecraft 集成体验! ?
? DiscordIncorporation
DiscordIncorporation is a Minecraft plugin for Spigot/Paper that integrates your server with Discord. It allows bidirectional chat, remote command execution from Discord, console command capture, and logs in a Discord channel.
✨ Features
- ? Bidirectional chat between Minecraft and Discord
- ⚡ Execute server commands from Discord using allowed roles
- ?️ Capture all console commands and send them to a Discord channel
- ? /online command in Discord to see online players
- ? /discordinc reload command to reload configuration without restarting the server
- ? Messages configurable in
messages.yml (Spanish and English)
?️ Requirements
- Minecraft 1.17 - 1.20 (Paper/Spigot)
- Java 16+ (Java 22 recommended)
- Discord Bot (own token)
- JDA library included in the plugin
? Installation
- Download the
.jar file and place it in your server's plugins folder.
- Restart the server to generate default configuration.
- Configure
config.yml:
bot-token: "YOUR_BOT_TOKEN"
log-channel-id: "DISCORD_CHANNEL_ID"
allowed-roles:
- "Admin"
- "Moderator"
Optionally, customize messages in messages.yml to enable/disable messages, chat formats, and permission messages.
? Creating the Discord Bot
-
Go to Discord Developer Portal
and create a new application.
-
Create a bot under the Bot section and copy its token.
-
Enable Server Members Intent in Privileged Gateway Intents.
-
Invite the bot to your server using OAuth2 URL Generator:
-
Scopes: bot and applications.commands
-
Bot Permissions: Send Messages, Read Message History, Administrator (optional)
-
Paste the token in config.
? Usage
Minecraft Commands
/discordinc reload
Reloads the plugin configuration and messages.
Discord Slash Commands
/online → Shows online players
/cmd command:<text> → Executes a Minecraft command from Discord (requires allowed role)
⚙️ Configurable Messages (messages.yml)
plugin-enabled-es, plugin-enabled-en → Messages when enabling the plugin
plugin-disabled-es, plugin-disabled-en → Messages when disabling the plugin
chat-mc-format → Format of Minecraft messages sent to Discord
chat-discord-format → Format of Discord messages sent to Minecraft
no-permission → Message when a role does not have permission
⚠️ Warnings
Make sure to use a valid Discord token.
Keep the token safe; if leaked, someone could control your bot.
If your server is in offline-mode, anyone can join without Mojang authentication (does not directly affect Discord plugin but is insecure).
? Credits
Plugin developed by [YourName]
Inspired by Discord integrations for Minecraft
Library used: JDA
? License
MIT License – You can modify and redistribute under the license terms.
Enjoy your Discord ↔ Minecraft integration! ?
评论 0
登录后参与评分
还没有评论,来抢沙发吧