EnderLink
一个简单可靠的连接系统,用于将 Minecraft 与 Discord 进行联动。
此描述可能并非最新版本。如需查看最新说明,请访问 github.com/finnjosten/EnderLink
✅ 支持版本
- Minecraft/Bukkit:
1.21.3
- 基于 Purpur 1.21.3 构建并测试
- 其他版本可能可用,但未经官方测试。
? 功能
听说过 DiscordSRV 吗?这是对该理念的全新演绎。使用 EnderLink,你可以:
- 跨平台聊天: 在 Discord 或 Minecraft 中发送消息,它们将在另一个平台上显示。
- 死亡播报: 想通过只广播玩家 悲惨 的死亡来炫耀一番吗?完全可行。
- 服务器状态更新: 当服务器 启动 或 关闭 时,通知 Discord 频道。
- 更多功能: 不止于此,安装插件后自行探索吧!
⚙️ 工作原理
非常简单。让我们定义几个关键部分:
- Discord – 你的 Discord 服务器(公会)。
- Discord Bot – 被邀请到你的服务器中收发消息的机器人。
- WebSocket/WSS – 中继所有数据的桥接服务器。
- Minecraft – 运行 EnderLink 插件的 Minecraft 服务器。
流程如下所示:
MC 事件发生 → 发送至 WebSocket → Discord Bot 接收事件 → Bot 发送消息
示例:
玩家在 MC 中发送消息 → 插件中继至 WebSocket → Discord Bot 接收 → 消息出现在 Discord 频道中
? 要求
你需要:
- 一个运行以下代码的 Discord bot:finnjosten/EnderLinkDiscord
- 一个 WebSocket 服务器,可以是:
?️ 设置指南
-
准备 Bot 和 WebSocket
-
安装插件
- 将 EnderLink 插件
.jar 文件放入你的 Minecraft 服务器的 plugins 文件夹中。
- 使用
/plugman load EnderLink-{version} 重新加载 (需要 PlugmanX)
或者直接重启服务器。
-
配置插件
- 前往
plugins/EnderLink/config.yml。
- 复制
room-id 和 room-secret 的值。
-
配置 Discord Bot
-
启动一切
- 启动或重启你的 Discord bot。在控制台中你应该会看到一条已连接到 websocket 的消息。
- 检查你的 Minecraft 控制台,你应该会看到一条注册成功的消息。
-
测试一下!
- 在配置的 Discord 频道中发送一条消息 → 它应该出现在你的 Minecraft 服务器(和控制台)中。
- 在游戏中聊天 → 消息将显示在 Discord 中。
?️ 可选配置
自定义房间 ID 和密钥
在插件的 config.yml 中,你可以将房间 ID 和房间密钥设置为任意值。
room-id: UUID
room-secret: SECRET
在这里你可以将 ID 设置为你喜欢的内容,我们建议尽量保持随机性,并将长度保持在 32 个字符以内或等于 32 个字符。
除了 ID 之外,你还可以设置自己的 Secret(或者更准确地说是密码)。同样,我们建议尽量保持随机性,并将长度保持在 32 个字符以内或等于 32 个字符。
为什么我们建议使用随机字符?任何从事过某种安全工作的人都知道,事物越随机,就越难被猜测出来。如果你选择密码为 password123,那么可以肯定它会被猜解出来。此外,由于这并不像是一个你需要记住的密码,安全性更高。你只需复制一次,然后粘贴到需要的 bot 中即可。之后就没有理由再去记住这个密钥了。
启用/禁用 MC 事件
再次在插件的 config.yml 中,你可以设置插件应监听哪些 Minecraft 事件。
events:
- chat
- join
- leave
- death
- advancement
- server-start
- server-stop
在这个列表中,你可以直接设置要监听的事件。选项如下:
chat: Minecraft 中的所有类型的聊天消息。
join: 玩家加入游戏。
leave: 玩家离开游戏。
death: 玩家因某种原因死亡。
advancement: 玩家获得成就(或在 MC 中称为进度)。
server-start: 一旦服务器启动,它将发送此事件。
server-stop: 一旦服务器停止,它将发送此事件。
两个电源事件(server-start/stop)应在服务器实际启动和停止时仅发送一次,而不是在插件加载/卸载时发送,尽管可能会出现错误。
? 完成!
就是这样。你现在拥有了通过 EnderLink 实现的无缝 Minecraft ↔ Discord 聊天集成。
去试试吧,发送一条消息,见证奇迹的发生!
EnderLink
A simple and reliable connection system for linking Minecraft and Discord.
This description might not be the latest version, To check the most up to date description head on over to github.com/finnjosten/EnderLink
✅ Supported Versions
- Minecraft/Bukkit:
1.21.3
- Built and tested on Purpur 1.21.3
- Other versions may work but are not officially tested.
? Features
Ever heard of DiscordSRV? This is a fresh take on that idea. With EnderLink, you can:
- Cross-Chat: Send messages in Discord or Minecraft and have them appear on the other platform.
- Death Messages: Want to flex on your players by only broadcasting their tragic deaths? Totally possible.
- Server Status Updates: Notify a Discord channel when the server starts up or shuts down.
- And more: Its not just limited to only this, install the plugin and find out!
⚙️ How It Works
It’s pretty simple. Let’s define the key parts:
- Discord – Your Discord server (guild).
- Discord Bot – The bot invited to your server that sends and receives messages.
- WebSocket/WSS – The bridge server that relays all data.
- Minecraft – Your Minecraft server running the EnderLink plugin.
The flow looks like this:
MC Event Happens → Sent to WebSocket → Discord Bot Receives Event → Bot Sends Message
Example:
Player sends message in MC → Plugin relays to WebSocket → Discord Bot receives it → Message appears in Discord channel
? Requirements
You’ll need:
- A Discord bot running the code from: finnjosten/EnderLinkDiscord
- A WebSocket server, either:
?️ Setup Guide
-
Prepare the Bot & WebSocket
-
Install the Plugin
- Place the EnderLink plugin
.jar into your Minecraft server’s plugins folder.
- Reload with
/plugman load EnderLink-{version} (requires PlugmanX)
or simply restart the server.
-
Configure the Plugin
- Go to
plugins/EnderLink/config.yml.
- Copy the values for
room-id and room-secret.
-
Configure the Discord Bot
-
Launch Everything
- Start or restart your Discord bot. In the console you should see a message that its connected to the websocket.
- Check your Minecraft console, you should see a successful registration message.
-
Test It!
- Send a message in the configured Discord channel → it should appear in your Minecraft server (and console).
- Chat in-game → the message will show up in Discord.
?️ Optional configuration
Custom room ID and Secret
In the plugins config.yml you can set the room id and room secret to what ever you want.
room-id: UUID
room-secret: SECRET
Here you can set the ID to something you would like, we suggest you keep this as random as possible and keep the length at or under 32 characters.
Besides the ID you can also set your own Secret or better called Password. This again we suggest keeping as random as possible and at or under 32 characters.
Why do we suggest random characters? Any one who works with some kind of security already knows that the more random something is the harder to guess it is. If you choose your password to be password123 you can guranteed it will be guessed. Besides it being more secure its not like a password you need to remember. You copy it once and just paste it into the bots that need it. After that there is no reason to remember this secret.
Enabling / Disabling MC events
Again in the plugins config.yml you can set what Minecraft events the plugin should be listening to.
events:
- chat
- join
- leave
- death
- advancement
- server-start
- server-stop
In this list you can just set the events to listen to. The options are as follows:
chat: All types of chat messages in minecraft.
join: Joining of a player.
leave: Leaving of a player.
death: A player dying for some reason.
advancement: A player getting an achievement (or now called advancements in MC).
server-start: Once the server is started up it will send out this event.
server-stop: Once the server is stopped it will send out this event.
Both power events (server-start/stop) should in only be send out if the server actually starts and stop and not on plugin load / unload but errors could occur.
? Done!
That’s it. You now have seamless Minecraft ↔ Discord chat integration with EnderLink.
Go ahead, send a message and watch the magic happen!
评论 0
登录后参与评分
还没有评论,来抢沙发吧