StreamGuard
StreamGuard 是一款面向希望将世界互动权限绑定于实时直播验证的社区的服务端防护模组。
未经验证的玩家可以允许其移动、聊天和使用安全指令,也可以将其冻结、限制指令使用或踢出服务器。影响世界的行为可单独配置,因此每个服务器都能自行决定对实时直播要求的严格程度。
服务端要求
- Paper/Spigot
1.20.1+
- Java
17+
- 经典
plugin.yml 格式
- 不依赖 NMS 或 CraftBukkit 内部实现
玩家流程
玩家通过服务端管理自己的直播链接:
/stream 设置
/stream 状态
/stream link twitch <频道登录名>
/stream link youtube <频道 ID 或 @用户名>
/stream 验证
/stream 取消
管理员管理访问权限、手动验证和绕过功能:
/streamguard 状态 <玩家>
/streamguard 豁免 授予 <玩家> [持续时间] [原因]
/streamguard 豁免 移除 <玩家>
/streamguard 验证 <玩家> [手动|twitch|youtube] [原因]
/streamguard 取消验证 <玩家> [原因]
/streamguard 重载
豁免持续时间支持 s、m、h 和 d 后缀,例如 30m、2h 或 1d。省略持续时间则授予永久豁免。
配置
config.yml 将玩家状态规则与影响世界的行为规则分离。
enforcement.unlinked 控制未绑定直播账号的玩家。
enforcement.not-live 控制已绑定但当前未进行直播的玩家。
enforcement.blocked-actions 控制被拦截的行为,包括破坏/放置方块、容器交互、拾取/丢弃物品、合成、交易、实体伤害/交互、水桶使用、火焰以及其他受保护的交互行为。
onboarding.enabled 控制可选的提供者选择器设置流程。
onboarding.provider-picker 控制储物箱 GUI 的标题、行数、填充物物品、取消按钮以及提供者按钮。
onboarding.chat-input 控制聊天输入超时时间、最大长度、取消关键词,以及在绑定后是否立即验证。
web.live-feed 控制伴侣站点的可选直播流 API、CORS 来源、刷新间隔以及提供者元数据缓存。
commands.safe-while-unverified 在启用命令拦截时,仍允许使用 /stream、/login 和 /register 等命令。
每种状态均可独立允许或阻止移动、聊天、命令执行,以及在加入服务器时被踢出。
提供者(Providers)
Twitch 验证使用 Helix 直播 API,配置如下:
providers:
twitch:
enabled: true
client-id: ""
client-secret: ""
YouTube 验证使用 YouTube Data API,配置如下:
providers:
youtube:
enabled: true
api-key: ""
YouTube 链接支持频道 ID 或 @handle 格式。
提供者身份以数据结构形式建模,而非封闭枚举。未来新增的提供者(例如 Discord 直播状态)只需添加基础设施适配器并注册其提供者 ID,即可无需修改核心访问策略。
伴侣站点(Companion Site)
可选的实时直播墙位于 minecraft-stream-guard-site。它会读取 StreamGuard 的 /api/live 数据流,并将当前在线的玩家渲染为全屏网页展示墙。
支持
StreamGuard 是免费且开源的。如果它对你的服务器有所帮助,你可以通过 Ko-fi 支持开发工作。
链接
许可证
StreamGuard 采用 GPL-3.0-only 许可证授权。
StreamGuard
StreamGuard is a survival-server guardrail for communities that want world interaction gated behind
live stream verification.
Unverified players can be allowed to move, chat, and use safe commands, or they can be frozen,
command-limited, or kicked. World-affecting actions are configured separately, so each server can
choose how strict the live requirement should be.
Server Target
- Paper/Spigot
1.20.1+
- Java
17+
- Classic
plugin.yml
- No NMS or CraftBukkit internals
Player Flow
Players manage their stream link from the server:
/stream setup
/stream status
/stream link twitch <channel-login>
/stream link youtube <channel-id-or-@handle>
/stream verify
/stream cancel
Admins manage access, manual verification, and bypasses:
/streamguard status <player>
/streamguard bypass grant <player> [duration] [reason]
/streamguard bypass remove <player>
/streamguard verify <player> [manual|twitch|youtube] [reason]
/streamguard unverify <player> [reason]
/streamguard reload
Bypass durations support s, m, h, and d suffixes, such as 30m, 2h, or 1d. Omitting
the duration grants a persistent bypass.
Configuration
config.yml separates player state rules from world-affecting action rules.
enforcement.unlinked controls players who have not linked a stream account.
enforcement.not-live controls linked players who are not currently live.
enforcement.blocked-actions controls block break/place, containers, pickup/drop, crafting,
trading, entity damage/interact, buckets, fire, and other guarded interactions.
onboarding.enabled controls the optional provider-picker setup flow.
onboarding.provider-picker controls the chest GUI title, rows, filler item, cancel item, and
provider buttons.
onboarding.chat-input controls chat input timeout, max length, cancel keyword, and whether to
verify immediately after linking.
web.live-feed controls the optional live feed API, CORS origins, refresh interval, and provider
metadata cache for the companion site.
commands.safe-while-unverified keeps commands such as /stream, /login, and /register
usable when command blocking is enabled.
Each state can independently allow or block movement, chat, commands, and kick-on-join.
Providers
Twitch verification uses the Helix streams API with:
providers:
twitch:
enabled: true
client-id: ""
client-secret: ""
YouTube verification uses the YouTube Data API with:
providers:
youtube:
enabled: true
api-key: ""
YouTube links accept either a channel ID or @handle.
Provider identity is modeled as data, not as a closed enum. A future provider, such as Discord
streaming presence, can add an infrastructure adapter and register its provider ID without changing
the core access policy.
Companion Site
The optional live wall lives at
minecraft-stream-guard-site. It reads
StreamGuard's /api/live feed and renders the currently live players as a fullscreen web wall.
Support
StreamGuard is free and open source. If it helps your server, you can support development on
Ko-fi.
Links
- Source:
- Companion site:
- Support development:
License
StreamGuard is licensed under GPL-3.0-only.
评论 0
登录后参与评分
还没有评论,来抢沙发吧