DLAW
基于 Discord 的白名单 Spigot 插件,通过自定义 Discord 机器人实现。
重要提示! > 您可以通过 Discord 服务器 直接向我申请 AUTH TOKEN。注册和管理页面目前仍处于 Beta 测试阶段。Auth Token 可让您正常使用 /verify 和 /unverify 命令。
账户链接问题? 请加入支持 Discord 并说明您的问题!最常见的原因是您失去了对旧 Discord 账户的访问权限,但仍想在自己的服务器上游玩。目前我可以手动为您解除账户绑定。
功能
- 云端同步账户链接
- 服务器直接集成(加入、离开、死亡、进度、玩家聊天)
- 死亡时发送坐标 DM(私信)
- 嵌入消息颜色可自定义
- 机器人状态显示在线玩家数量
- HTTP REST API(面向 Web 开发者)
Discord 斜杠命令
以下是所有可用的 Discord 命令:
/verify 将 Minecraft Java 版账户与 Discord 账户关联
/unverify 移除现有的账户关联
/ip 返回服务器 IP(来自 config.yml)
/lookup 允许您根据 Minecraft 用户名查找对应的 Discord 账户
/rcon 在服务器上执行命令
/seed 返回世界种子
/status 显示当前在线玩家数量和服务器版本
HTTP 端点
此功能对于在您的网页上集成 Minecraft 服务器的数据和状态非常有用。普通用户可能不需要此功能。
根据您的需要,可以在 config.yml 中启用或禁用 Web 服务器。
GET /api/status 完整的服务器状态
GET /api/status/players 在线玩家列表
GET /api/status/plugins 插件列表
GET /api/status/world 世界信息
GET /api/players 所有曾加入服务器的玩家列表
GET /api/players/<uuid> 根据 UUID 从服务器获取玩家信息(适用于详情页)
GET /api/user/<uuid> 根据 Minecraft 账户 UUID 获取 Discord 账户信息
GET /api/auth/<uuid> 验证玩家身份(暴露与其他插件/服务器需求相同的登录认证逻辑)
端点 /api/auth 暴露了与玩家登录时相同的认证流程,可用于其他插件或其他服务器。如果您想在多个服务器上使用该类型的登录认证,但希望继续使用 DLAW(例如您有一个测试服务器或位于其他地区的服务器),可以使用插件 DasherLink via GitHub。
如果您开发了使用 DLAW 的扩展(如网页)或自定义插件,请在 Discord 上通知我,以便在此展示。
安装
从 releases 下载最新版本,并将其放入您的 plugins 文件夹中。
确保先启动一次 Minecraft 服务器,然后前往 /plugins/DLAW/config.yml 编辑与您设置相对应的行。
要创建 Discord 机器人并获取其令牌,您需要前往 此处。创建应用后,还需创建机器人,并将令牌复制到剪贴板以备后续配置使用。务必启用所有特权意图,包括 PRESENCE_UPDATE、GUILD_MEMBERS 和 MESSAGE_CONTENT。之后,生成包含范围 bot 和 application.commands 的邀请 URL。对于权限,您可以选择“Administrator”,因为这是您的私人机器人。
配置示例
discord:
token: token-goes-here
guild: 553568657410883604
channel:
chat: 1024426048932302878
role:
join:
enabled: true # 切换是否使用角色认证
id: 553568657410883604 # 加入服务器所需的角色 ID
staff: 707598912768442489
verified: 1221230313271853086
dm-death-cords: true
include-global-bans: true
api:
enable: true
port: 8010
minecraft:
address: play.beocraft.net
color:
system: 65535
join: 65280
leave: 16711680
death: 16749128
advancement: 16751104
DLAW
Spigot plugin for Discord based whitelisting over a custom discord bot
IMPORTANT !!! > You can request an AUTH TOKEN from me directly via the discord server The signup and management page is still very much beta. Auth Token lets you have /verify and /unverify commands working.
ACCOUNT LINKING ISSUES? Please join support discord and explain your issue! Most llikley is that you have lost access to the older discord account and still want to play on your server. I can unlink your accounts manually for now
Features
- Cloud synced account linking
- Direct server integration (join, leave, death, advancements, player chat)
- On death cords DM
- Customisable colors for embeds
- Player count in bot status
- HTTP REST API (for web developers)
Discord Slash Commands
These are all the available discord commands:
/verify Links a Minecraft Java account to a Discord account
/unverify Removes the existing account link
/ip Returns the server IP (from config.yml)
/lookup Allows you to find a Discord account from a Minecraft username
/rcon Executes a command on the server
/seed Returns the world seed
/status Displays current online players and server version
HTTP Endpoints
This feature is very useful for integration data and status from your minecraft server on your webpage. For general
users this feature might not be needed
The web server can be enabled or disabled in config.yml based on your needs
GET /api/status Complete server status
GET /api/status/players Online player list
GET /api/status/plugins List of plugins
GET /api/status/world World information
GET /api/players List of all players who joined the server
GET /api/players/<uuid> Get player from server by UUID (useful for details page)
GET /api/user/<uuid> Discord account information from Minecraft account UUID
GET /api/auth/<uuid> Authenticate player (exposes same auth logic as when player joins the server itself for needs of other plugins/servers)
Endpoint /api/auth exposes the same authentiticaion process during player login for use in other plugins or other servers. If you want to use this type of login auth on multiple servers but keep DLAW (ex. You have a test server or one in another region) you can use the plugin DasherLink via GitHub.
If you develop an extension (ex. web page) or a custom plugin that uses DLAW please notify me on Discord for me to feature it here
Setup
Download the latest version from releases and put it in your plugins
folder.
Make sure to start the minecraft server once, after so go to /plugins/DLAW/config.yml and edit the lines corresponding
to your settings
In order to create a Discord Bot and get its token you need to go here.
After creating the application also create the bot, copy the token to clipboard for later use in configs. Make sure to
enable all privileged intentions like PRESENCE_UPDATE, GUILD_MEMBERS and MESSAGE_CONTENT. After that go and generate the
invite url with scopes bot and application.commands. For permission, you can choose Administrator since it's your
private bot
Configuration example
discord:
token: token-goes-here
guild: 553568657410883604
channel:
chat: 1024426048932302878
role:
join:
enabled: true # Toggles if role auth is in use
id: 553568657410883604 # Role ID of the required role to join the server
staff: 707598912768442489
verified: 1221230313271853086
dm-death-cords: true
include-global-bans: true
api:
enable: true
port: 8010
minecraft:
address: play.beocraft.net
color:
system: 65535
join: 65280
leave: 16711680
death: 16749128
advancement: 16751104
评论 0
登录后参与评分
还没有评论,来抢沙发吧