自动为你的支持者白名单你的服务器
玩家只需在 minecraftauth.me 上将他们的 Minecraft 账号与 Twitch、YouTube、Patreon 和 Discord 关联一次,然后加入即可。任何不符合你条件的人都会被拒绝,并收到一条告知他们如何加入的消息。
支持运行于: Spigot / Paper / Folia · Sponge · Velocity · BungeeCord · Fabric, Forge & NeoForge (1.16.5 – 26.x)
条件
| 条件 |
允许符合以下条件的玩家进入… |
TwitchFollower() |
关注了你的 Twitch |
TwitchSubscriber() / TwitchSubscriber(2) |
订阅了 Twitch(任意层级 / 第 2 层或更高) |
YouTubeSubscriber() |
订阅了你的 YouTube 频道 |
YouTubeMember() |
是你 YouTube 频道的付费会员 |
PatreonMember() / PatreonMember("Diamond") |
是活跃的赞助者(任意层级 / “Diamond”层级) |
DiscordServer("server id") |
在你的 Discord 服务器中 |
DiscordRole("role id") |
拥有某个 Discord 角色 |
DiscordRole("server id", "Role Name") |
拥有指定名称的角色(名称必须附带服务器 ID) |
Linked() / Linked("discord") |
已关联其账号(以及一个 Discord 账号) |
Discord 相关条件需要你的服务器中存在 MinecraftAuth bot,且你已关联的 Discord 账号必须是该机器人的所有者,或者在该服务器中拥有“管理员”或“管理消息”权限。
组合使用
使用 and、or 和 not(...)。列表中的每一行代表一种替代方案:满足 任一 行的玩家即可进入。
gatekeeper:
conditions:
- TwitchSubscriber() and not(DiscordRole("123456789012345678", "Banned"))
- DiscordRole("234567890123456789") # 工作人员无需订阅(尽管他们应该这样做...)
设置
- 在 minecraftauth.me 上关联你自己的 Twitch / YouTube / Patreon / Discord 账号。
- 在 minecraftauth.me/developers 创建一个应用。
- 将 jar 文件放入
plugins/ 或 mods/ 目录(Fabric 还需要 Fabric API),然后启动服务器一次。
- 将应用 ID 和密钥粘贴到
MinecraftAuth.yml 中的 api.application-id / api.application-secret 下(模组版位于 config/minecraftauth/)。
- 设置你的
gatekeeper.conditions,然后运行 /minecraftauth reload(或 /mcauth reload)。
须知
- 绕过: 在
gatekeeper.bypass 下列出 UUID 或名称。当 bypass-admins 开启时,操作员和拥有 minecraftauth.bypass 权限的玩家会跳过检查。
- 服务中断:
on-api-error: deny(默认)或 allow 决定在无法连接到 MinecraftAuth.me 时发生什么。
- 网络: 将其安装在 Velocity/BungeeCord 代理服务器上,而不是后端服务器。代理可以为每个后端服务器设置不同的规则。
- 离线模式 / 基岩版: 无法检查离线模式服务器。基岩版(Floodgate)玩家需要关联 Java 账号或在
bypass 条目中列出。
- 其他插件(如封禁等)仍可与本插件共存。如果你希望 MinecraftAuth 成为唯一的门禁,请关闭原版白名单和其他白名单插件。
完整文档与故障排除:
Whitelist your server for your supporters automatically
Players link their Minecraft account to Twitch, YouTube, Patreon and Discord once at minecraftauth.me, then just join. Anyone who doesn't meet your conditions is turned away with a message telling them how to get in.
Runs on: Spigot / Paper / Folia · Sponge · Velocity · BungeeCord · Fabric, Forge & NeoForge (1.16.5 – 26.x)
Conditions
| Condition |
Lets in players who… |
TwitchFollower() |
follow you on Twitch |
TwitchSubscriber() / TwitchSubscriber(2) |
subscribe on Twitch (any tier / tier 2 or higher) |
YouTubeSubscriber() |
subscribe to your YouTube channel |
YouTubeMember() |
are paid members of your YouTube channel |
PatreonMember() / PatreonMember("Diamond") |
are active patrons (any tier / the "Diamond" tier) |
DiscordServer("server id") |
are in your Discord server |
DiscordRole("role id") |
have a Discord role |
DiscordRole("server id", "Role Name") |
have a role by name (a name always needs the server ID) |
Linked() / Linked("discord") |
have linked their account (and a Discord account) |
Discord conditions need the MinecraftAuth bot in your server, and your linked Discord account must own it or have Administrator or Manage Messages there.
Combine them
Use and, or and not(...). Each line in the list is an alternative: a player who meets any line gets in.
gatekeeper:
conditions:
- TwitchSubscriber() and not(DiscordRole("123456789012345678", "Banned"))
- DiscordRole("234567890123456789") # staff don't need to subscribe (though they should...)
Setup
- Link your own Twitch / YouTube / Patreon / Discord accounts at minecraftauth.me.
- Create an application at minecraftauth.me/developers.
- Put the jar in
plugins/ or mods/ (Fabric also needs Fabric API) and start the server once.
- Paste the application ID and secret into
api.application-id / api.application-secret in MinecraftAuth.yml (mods: config/minecraftauth/).
- Set your
gatekeeper.conditions, then run /minecraftauth reload (or /mcauth reload).
Good to know
- Bypass: list UUIDs or names under
gatekeeper.bypass. Operators and players with minecraftauth.bypass skip the checks while bypass-admins is on.
- Outages:
on-api-error: deny (default) or allow decides what happens when MinecraftAuth.me can't be reached.
- Networks: install it on the Velocity/BungeeCord proxy, not on the backend servers. Proxies can set different rules for each backend server.
- Offline mode / Bedrock: offline-mode servers can't be checked. Bedrock (Floodgate) players need a linked Java account or a
bypass entry.
- Other plugins (bans, etc.) still work alongside it. Turn off the vanilla whitelist and other whitelist plugins if you want MinecraftAuth to be the only gate.
Full docs & troubleshooting:
评论 0
登录后参与评分
还没有评论,来抢沙发吧