AMCDB (Another Minecraft-Discord Bridge)
无 AI 软件
AMCDB 由人类亲手打造,是对编程艺术以及用双眼审视软件内部构造这一传统的热爱之作。
本模组中没有任何代码是由 LLM 或“AI”工具生成的。
概述
AMCDB 是一款 Fabric/Quilt 模组,用于将你的 Minecraft 服务器连接到 Discord 服务器。你可以将游戏内聊天连接到 Discord 频道,设置一个用于服务器控制台的频道,甚至可以从任何地方运行服务器命令!
以下是它在 Minecraft 中的样子...

...而在 Discord 中则是这样!

如果你更喜欢让 Discord 中出现的游戏内消息看起来像是来自玩家(并显示他们的玩家头像作为头像),AMCDB 也支持 Discord 网络钩子(webhooks):

主要功能
- AMCDB 速度快且*对延迟友好。它几乎在所有工作都在主服务器线程之外进行,因此不会影响游戏性能。
- AMCDB *灵活性强。你可以按照自己的意愿配置一切——自定义游戏内和 Discord 中的消息外观,在频道主题中放入对你最有用的信息,甚至给 Discord 机器人设置一个聪明的状态消息!
- AMCDB 稳定且*兼容性好。它不使用 mixins 来修改 Minecraft 代码,因此在不同 Minecraft 版本之间很少会出现故障,并且能与几乎所有其他 Fabric 模组良好配合。
- 最后,AMCDB *有趣。它支持各种酷炫的 Discord 功能,例如:
- 字体样式...

- ...名称颜色...

- ...甚至是悬停即可揭示的剧透文本!

- 字体样式...
安装
请按照以下步骤在你的服务器上设置 AMCDB。
注意:你需要是你想要连接的 Discord 服务器的管理员。
在 Minecraft 服务器上安装 AMCDB
你需要一个 Fabric 或 Quilt 服务器。一旦设置好,请确保 [Fabric API](https://modrinth.com/mod/fabric-api) 位于你的 mods 文件夹中——这是 AMCDB 唯一的依赖项。
然后,从 GitHub Releases 或 Modrinth 获取最新的 AMCDB .jar 文件。它可能是类似 amcdb-1.1.5.jar 的文件。将其放入你的 mods 文件夹中。
接下来,启动你的服务器。它会崩溃——这只是因为你还没有配置 AMCDB。现在你已经启动过一次服务器了,在 config 文件夹中应该会有一个名为 amcdb.properties 的文件。用文本编辑器打开该文件,并在下一步中使用它。
设置 Discord 机器人
如果你以前使用过其他 Minecraft-Discord 模组,你可能已经有一个机器人。只要它在你的服务器上有正确的权限,你就可以重用它——只需将令牌放入 amcdb.properties 文件中即可。
如果你没有 Discord 机器人:
- 登录 。
- 点击右上角的 New Application(新建应用)。
- 为你的机器人取一个名字,然后点击 Create(创建)。

- 在屏幕左侧,点击 Bot。

- 现在你将生成 AMCDB 用于连接的令牌。在页面的主要部分,找到 Bot 部分中的 Token,然后点击 Reset Token。确认并输入你的两步验证代码(如果需要)后,会出现类似下图的一串随机字符——这就是你的令牌!点击 Copy(复制)。

- 在你之前打开的
amcdb.properties文件中,找到以amcdb.discord.bot.token=开头的那一行,并将你的机器人令牌粘贴到该行末尾。它看起来像这样:amcdb.discord.bot.token=MTUxNjYyMDU5MTU2ODkxNjUyMQ.GtHHYH.cwfUiwbSCguEt8vA4KtdUdPlD-kexM_V98cSwE - 向下滚动到 Privileged Gateway Intents(特权网关意图)部分,并开启 Message Content Intent(消息内容意图)。这将允许你的机器人读取你 Discord 服务器中的消息,以便将其显示在你的 Minecraft 游戏聊天中。

- 回到屏幕左侧,转到 OAuth2。
- 在 OAuth2 URL Generator(OAuth2 URL 生成器)部分,在 Scopes(作用域)下,勾选
bot选项。将出现一个标记为 Bot Permissions(机器人权限)的新框。在此处,选择以下权限:- Manage Channels(管理频道)
- View Channels(查看频道)
- Send Messages(发送消息)

- 然后向下滚动到 Generated URL(生成的 URL)部分,并从框中复制 URL。它应该看起来像这样:
https://discord.com/oauth2/authorize?client_id=1516620591568916521&permissions=3088&integration_type=0&scope=bot
- 将你复制的 URL 粘贴到一个新的浏览器标签页中,选择一个服务器,点击 Continue(继续),然后点击 Authorize(授权)。你应该看到机器人加入你的 Discord 服务器!
配置聊天频道
AMCDB 有许多可以配置的设置,但除了机器人令牌外,你只需要配置一项即可开始使用——你需要告诉 AMCDB 你想用于游戏内聊道的频道 ID。你可能希望为此创建一个新的文本频道,因为该频道中的所有消息都会出现在 Minecraft 中,反之亦然。
要获取频道 ID,请在你的 Discord 应用中启用开发者模式。打开设置菜单,然后在左侧选择 Advanced(高级)。接着,开启 Developer Mode(开发者模式)。

一旦开启了开发者模式,你可以右键单击你想要使用的频道,然后点击 Copy ID(复制 ID)。将该 ID 粘贴到 amcdb.properties 中 amcdb.discord.chat.channel= 旁边。它看起来像这样:
amcdb.discord.chat.channel=1046313040837832782
如果你想为一个服务器控制台频道设置,也复制其 ID 并将其粘贴到 amcdb.discord.console.channel= 旁边。控制台频道支持运行你通过 Discord 发送的命令;出于安全考虑,此功能默认禁用,但你可以通过将设置 amcdb.discord.channels.console.enableExecution= 更改为 true 来启用它。
然后保存 amcdb.properties 文件并重新启动你的 Minecraft 服务器。如果你一切操作正确,你在游戏聊天中输入的任何内容都应该出现在 Discord 频道中,而你在 Discord 频道中输入的任何内容也应该出现在你的游戏中!
请随意探索 amcdb.properties 文件的其余部分,因为所有 AMCDB 的配置设置都位于此处。如果你更改了任何内容,你需要停止并启动 Minecraft 服务器以使新设置生效。
配置 webhook 模式
如果你想将 Minecraft 玩家头像显示为 Discord 头像,你需要启用 webhook 模式。这是可选的——如果不设置 webhook,AMCDB 也能正常工作。
要设置 webhook,请按照以下步骤操作:
- 打开你的 Discord 服务器设置页面。
- 在左侧,选择 Integrations(集成)(在“Apps”类别下)。
- 点击“Webhooks”,然后点击“New Webhook”(新建 Webhook)。
- 点击你的新 webhook,将其名称更改为 Minecraft(或你想要的任何名称),并将频道设置为你想用于 Minecraft 聊天的频道。
- 点击“Copy Webhook URL”(复制 Webhook URL)。
- 将 URL 粘贴到
amcdb.properties中amcdb.discord.channels.chat.webhookUrl=旁边。别忘了通过删除开头的#来取消注释该行。 - 与往常一样,保存
amcdb.properties文件并重启你的服务器。你应该开始看到带有玩家名称和头像的游戏内消息出现在 Discord 中!
升级
通常,你只需将 .jar 文件替换为新版本即可升级 AMCDB。
当你升级时,最好检查 amcdb.properties 中是否添加了新属性;你可以在这里找到最新版本的默认配置文件。偶尔会添加新的必需属性;这会导致你在更新 .jar 后服务器无法启动,直到你将新属性添加到你的配置中。
你还可以通过强制 AMCDB 生成一个新的配置文件来更新你的 properties 文件:
- 停止你的 Minecraft 服务器
- 将
amcdb.properties重命名为一个临时名称,例如amcdb.properties.old - 更新
.jar文件并启动你的服务器。AMCDB 会生成一个新的amcdb.properties模板,并且服务器会像全新安装时一样停止。 - 从
amcdb.properties.old中复制你的设置到新的amcdb.properties文件中。- 你也可以直接将任何缺失的属性复制到
amcdb.properties.old中,然后将其重新命名为amcdb.properties。
- 你也可以直接将任何缺失的属性复制到
- 启动你的 Minecraft 服务器。
AMCDB (Another Minecraft-Discord Bridge)
AI-Free Software
AMCDB is proudly built by human hands, as a labor of love for the art of programming and the tradition of looking into the guts of a piece of software with one's own eyes.
No code within this mod was created by LLM or "AI" tools.
Overview
AMCDB is a Fabric/Quilt mod to connect your Minecraft server to a Discord server. You can connect in-game chat to a Discord channel, set up a channel for the server console, and even run server commands from anywhere!
Here's what it looks like in Minecraft...

...and here's what it looks like in Discord!

In case you prefer to see in-game messages in Discord appear to come from
players (and see their player heads as avatars!), AMCDB supports Discord
webhooks as well:

Key Features
- AMCDB is fast and lag-friendly. It does almost all its work off the main server thread, so there's no impact to game performance.
- AMCDB is flexible. You can configure everything just the way you want it -- customize how messages look in game and in Discord, put the most useful information for you in the channel topics, even give the Discord bot a clever status message!
- AMCDB is stable and compatible. It doesn't use mixins to modify Minecraft code, so it rarely breaks between Minecraft versions and it works well with just about any other Fabric mod.
- And lastly, AMCDB is fun. It supports all sorts of cool Discord
features, like:
- font styles...

- ...name colors...

- ...and even spoiler text you can hover to reveal!

- font styles...
Installation
Follow these steps to set up AMCDB on your server.
Note: you'll need to be an admin of the Discord server you want to connect.
Install AMCDB on your Minecraft server
You need a Fabric or Quilt server. Once you have that set up, make sure
Fabric API is in your mods folder -
that's the one dependency AMCDB has.
Then, grab the latest AMCDB .jar file from
GitHub Releases
or Modrinth. It'll be something like
amcdb-1.1.5.jar. Put that in your mods folder.
Next, start up your server. It will crash -- that's just because you haven't
configured AMCDB yet. Now that you've started the server once, there should be
a file called amcdb.properties inside your config folder. Open that file in
your text editor and keep it around for the next step.
Set up a Discord bot
If you've used a different Minecraft-Discord mod before, you might already
have a bot. You can reuse it as long as it has the right permissions on your
server - just put the token in the amcdb.properties file.
If you don't have a Discord bot:
- Log into
- Click New Application in the top right.
- Give your bot a name, and click Create.

- On the left side of the screen, click Bot.

- Now you'll generate the token that AMCDB will use to connect. On the main
part of the page, find Token in the Bot section and click Reset Token.
Once you confirm and enter your 2FA code (if required), a random string of characters will
appear like the picture below -- that's your token! Click Copy.

- In the
amcdb.propertiesfile you opened earlier, find the line that starts withamcdb.discord.bot.token=and paste your bot token on the end of that line. It'll look like this:amcdb.discord.bot.token=MTUxNjYyMDU5MTU2ODkxNjUyMQ.GtHHYH.cwfUiwbSCguEt8vA4KtdUdPlD-kexM_V98cSwE - Scroll down to the Privileged Gateway Intents section and turn on
Message Content Intent. This is what lets your bot read messages in your
Discord server so it can put them in your Minecraft game chat.

- Back on the left side of the screen, move on to OAuth2.
- In the OAuth2 URL Generator section, under Scopes, checkmark the
botoption. Another box labeled Bot Permissions will appear. Here, select the following permissions:- Manage Channels
- View Channels
- Send Messages

- Then scroll down to the Generated URL section and copy the URL from the box. It should look like this:
https://discord.com/oauth2/authorize?client_id=1516620591568916521&permissions=3088&integration_type=0&scope=bot
- Paste the URL you copied into a new browser tab, select a server, click Continue, then Authorize. You should see the bot join your Discord server!
Configure the chat channel
AMCDB has a lot of settings you can configure, but besides the bot token, there's only one you need to get started -- you need to tell AMCDB the ID of the channel you want to use for the in game chat. You'll probably want to create a new text channel for this, since all the messages in that channel will appear in Minecraft and vice versa.
To get the channel ID, enable Developer Mode in your Discord app. Open
the settings menu, then Advanced on the left. Then, turn on Developer
Mode.

Once Developer mode is turned on, you can right click on the channel you want
to use and click Copy ID. Paste that ID into amcdb.properties right next
to amcdb.discord.chat.channel=. It'll look like this:
amcdb.discord.chat.channel=1046313040837832782
If you want to set up a channel for the server console, copy its ID too and
paste it next to amcdb.discord.console.channel=. The console channel supports
running commands that you send via Discord; this feature is disabled by default
for safety, but you can enable it by changing the setting
amcdb.discord.channels.console.enableExecution= to true.
Then save the amcdb.properties file and start your Minecraft server again.
If you've done everything correctly, anything you type in the game chat
should appear in the Discord channel, and anything you type in the Discord
channel should appear in your game!
Feel free to explore the rest of the amcdb.properties file, as that's where
all of the configuration settings for AMCDB live. If you change anything,
you'll need to stop and start your Minecraft server for the new settings to
take effect.
Configure webhook mode
If you want to display Minecraft player heads as Discord avatars, you'll need to enable webhook mode. This is optional -- AMCDB will work fine if you don't set up a webhook.
To set up a webhook, follow these steps:
- Open your Discord server Settings page.
- On the left, select Integrations (under the "Apps" category).
- Click on "Webhooks", then "New Webhook".
- Click on your new webhook, change its name to Minecraft (or whatever you like), and set the channel to the channel you want to use for Minecraft chat.
- Click "Copy Webhook URL".
- Paste the URL into
amcdb.propertiesnext toamcdb.discord.channels.chat.webhookUrl=. Don't forget to uncomment that line by removing the#at the beginning. - As always, save the
amcdb.propertiesfile and restart your server. You should start to see in-game messages appearing in Discord with player names and avatars!
Upgrade
Generally, you can upgrade AMCDB simply by replacing the .jar file with the
new version.
When you upgrade, it's a good idea to check whether new properties have been
added to amcdb.properties; you can find latest version of the default
configuration here. Occasionally, new
required properties are added; this will cause your server to fail to start
after updating the .jar until you add the new properties to your
configuration.
You can also update your properties file by forcing AMCDB to generate a new one:
- Stop your Minecraft server
- Rename
amcdb.propertiesto a temporary name, e.g.amcdb.properties.old - Update the
.jarfile and start your server. AMCDB will generate a newamcdb.propertiestemplate, and the server will stop just like with a new installation. - Copy your settings from
amcdb.properties.oldto the newamcdb.properties.- You can also simply copy any missing properties into
amcdb.properties.oldand then rename it back toamcdb.properties.
- You can also simply copy any missing properties into
- Start your Minecraft server.
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
下载 AMCDB
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 AMCDB
更新内容
- 通过 @0x4e49434f4c45 在 添加对 Minecraft 26.1 的支持
完整更改日志:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧