Permission Preflight
Permission Preflight 会在你尝试进行方块、容器、实体和物品交互之前,预览这些操作是否可能被允许。
这是一个专为多人服务器打造的 Forge 实用工具,适用于受保护区域、出生点区域、冒险模式区域以及模组环境,在这些场景中,往往难以判断某个操作是被破坏、受限、被占有还是仅仅不可用。
它有助于解决的问题
Permission Preflight 可以帮助回答以下问题:
- 我可以破坏这个方块吗?
- 我可以在此处放置方块吗?
- 我可以打开这个箱子吗?
- 我可以与此方块或实体交互吗?
- 这是权限问题、占有(Claim)问题、保护问题还是设置问题?
当有有用信息时,该模组会显示一个紧凑的 HUD 覆盖层。它仅用于信息展示,不会绕过或授予任何权限。
支持的操作
Permission Preflight 可以检查:
- 破坏方块
- 放置方块
- 使用/与方块交互
- 打开容器
- 与实体交互
- 攻击实体
- 对方块使用物品
结果类型
Permission Preflight 将结果报告为:
- Allowed(允许) — 可用检查未发现限制
- Denied(拒绝) — 该操作很可能被阻止
- Partial(部分) — 操作的某些部分可能可行,但结果不完整或混合
- Unknown(未知) — 没有提供程序能够验证该操作
“未知”是一种正常结果。这意味着模组没有足够的信息来安全地判定为“允许”或“拒绝”。
HUD 覆盖层
该覆盖层设计得紧凑且不干扰视线。
默认情况下:
- 显示拒绝(Denied)结果
- 显示部分(Partial)结果
- 除非在配置中启用,否则隐藏允许(Allowed)结果
- 除非启用或处于详细模式,否则在普通模式下隐藏未知(Unknown)结果
详细模式可以显示:
- 正在检查的操作
- 提供程序名称
- 置信度级别
- 缓存新鲜度
- 提供程序跟踪详情
覆盖层可以配置为显示在快捷栏上方或准星附近。
聊天警告
当玩家尝试执行被预测为“拒绝”的操作时,Permission Preflight 可以在聊天栏显示简短警告。
为防止刷屏,警告设置了速率限制。
示例:
Preflight: likely denied — cannot open containers here.
提供程序
Permission Preflight 1.0.0 包含:
原版提供程序
检查常见的原版限制,例如:
- 旁观者模式
- 冒险/建造限制
- 世界边界
- 出生点保护
- 缺失或未加载的目标方块
- 缺失或死亡的目标实体
近期观察提供程序
监视被取消的 Forge 交互事件,并短暂记住最近的拒绝操作。
这有助于在失败尝试后识别来自保护系统的限制,即使没有直接的占有模组集成。
占有模组支持
Permission Preflight 目前未包含针对 FTB Chunks、Open Parties and Claims、Flan 或其他占有模组的直接 API 适配器。
它们不依赖于占有模组。缺少占有模组不会导致游戏崩溃。
通过近期观察提供程序,在被取消的交互之后仍可能出现与占有相关的拒绝提示。
命令
-
/preflight here
检查你当前选中的方块或实体。
-
/preflight debug
切换详细的提供程序输出和详细覆盖层模式。
-
/preflight reload
报告配置重载/实时配置行为。需要权限等级 2。
配置
配置选项包括:
enableOverlay
overlayPosition
showAllowed
showUnknownInNormalMode
showProviderInDetailedMode
showConfidenceInDetailedMode
useColorEmphasis
compactOverlay
maxReasonLength
enableChatWarnings
warningCooldownTicks
requestRateLimitPerSecond
cacheTtlTicks
maxInteractionReachBlocks
enableVanillaProvider
enableObservationProvider
enableClaimAdapters
debugLogging
默认网络行为:
requestRateLimitPerSecond: 4
cacheTtlTicks: 20
多人游戏行为
Permission Preflight 专为多人游戏和专用服务器设计。
- 服务端检查具有权威性
- 客户端覆盖层仅显示服务端响应
- 客户端仅在需要时发送请求
- 服务端验证目标可达范围
- 客户端无法查询任意远处的区块或占有区域
- 结果会被短暂缓存
- 缺少服务端支持时会优雅降级
推荐设置:
- 单人游戏: 安装在客户端
- 专用服务器: 安装在服务端
- 最佳多人游戏设置: 同时安装在服务端和客户端
- 仅服务端: 命令和服务端检查有效,但未安装该模组的客户端将无法看到覆盖层
- 在无该模组的服务器上仅安装于客户端: 无法获得服务端权威的结果
重要说明
Permission Preflight 不会:
- 授予权限
- 绕过保护
- 禁用占有
- 覆盖服务器规则
- 强制交互成功
- 单独阻止操作
它仅报告其可用检查所能确定的内容。
已知限制
- 在没有直接占有模组适配器的情况下,某些占有权限无法在第一次尝试操作之前进行预测。
- 某些模组方块可能未暴露足够的原版信息,无法完美分类所有交互。
- 高延迟可能会短暂延迟覆盖层更新。
- 攻击实体的检查比方块和容器的检查限制更多。
- 当没有任何提供程序能够验证该操作时,“未知”结果是预期的。
版本
- Minecraft: 1.20.1
- Loader: Forge
- Forge: 47.4.20
- Java: 17
- Mod version: 1.0.0
- Mod ID:
permission_preflight
- License: MIT
- Creator: Iljas
Permission Preflight
Permission Preflight previews whether block, container, entity, and item interactions are likely allowed before you attempt them.
It is a Forge quality-of-life utility built for multiplayer servers, protected areas, spawn regions, adventure-mode zones, and modded setups where it is not always clear whether something is broken, restricted, claimed, or simply unavailable.
What it helps with
Permission Preflight can help answer:
- Can I break this block?
- Can I place here?
- Can I open this chest?
- Can I interact with this block or entity?
- Is this a permission issue, claim issue, protection issue, or setup issue?
The mod displays a compact HUD overlay when it has useful information. It is informational only and does not bypass or grant permissions.
Supported actions
Permission Preflight can check:
- Break block
- Place block
- Use/interact with block
- Open container
- Interact with entity
- Attack entity
- Use item on block
Result types
Permission Preflight reports results as:
- Allowed — available checks found no restriction
- Denied — the action is likely blocked
- Partial — some part of the action may be possible, but the result is incomplete or mixed
- Unknown — no provider could verify the action
Unknown is a normal result. It means the mod did not have enough information to safely say Allowed or Denied.
HUD overlay
The overlay is designed to stay compact and out of the way.
By default:
- Denied results are shown
- Partial results are shown
- Allowed results are hidden unless enabled in config
- Unknown results are hidden in normal mode unless enabled or detailed mode is active
Detailed mode can show:
- Action being checked
- Provider name
- Confidence level
- Cache freshness
- Provider trace details
The overlay can be configured to appear above the hotbar or near the crosshair.
Chat warnings
When a player attempts an action that was predicted as denied, Permission Preflight can show a short chat warning.
Warnings are rate-limited to avoid spam.
Example:
Preflight: likely denied — cannot open containers here.
Providers
Permission Preflight 1.0.0 includes:
Vanilla provider
Checks common vanilla restrictions such as:
- Spectator mode
- Adventure/build restrictions
- World border
- Spawn protection
- Missing or unloaded target blocks
- Missing or dead target entities
Recent observation provider
Watches cancelled Forge interaction events and briefly remembers recent denied actions.
This can help identify restrictions from protection systems after a failed attempt, even without a direct claim-mod integration.
Claim mod support
Permission Preflight does not currently include direct API adapters for FTB Chunks, Open Parties and Claims, Flan, or other claim mods.
There are no hard dependencies on claim mods. Missing claim mods will not crash the game.
Claim-related denials may still appear after a cancelled interaction through the recent observation provider.
Commands
-
/preflight here
Checks your currently targeted block or entity.
-
/preflight debug
Toggles detailed provider output and detailed overlay mode.
-
/preflight reload
Reports config reload/live config behavior. Requires permission level 2.
Config
Config options include:
enableOverlay
overlayPosition
showAllowed
showUnknownInNormalMode
showProviderInDetailedMode
showConfidenceInDetailedMode
useColorEmphasis
compactOverlay
maxReasonLength
enableChatWarnings
warningCooldownTicks
requestRateLimitPerSecond
cacheTtlTicks
maxInteractionReachBlocks
enableVanillaProvider
enableObservationProvider
enableClaimAdapters
debugLogging
Default networking behavior:
requestRateLimitPerSecond: 4
cacheTtlTicks: 20
Multiplayer behavior
Permission Preflight is designed for multiplayer and dedicated servers.
- Server-side checks are authoritative
- Client overlay only displays server responses
- Clients send requests only when needed
- Server validates target reach
- Clients cannot query arbitrary distant chunks or claims
- Results are briefly cached
- Missing server support degrades gracefully
Recommended setup:
- Singleplayer: install on the client
- Dedicated server: install on the server
- Best multiplayer setup: install on both server and clients
- Server-only: commands and server checks work, but clients without the mod will not see the overlay
- Client-only on a server without the mod: no server-authoritative results are available
Important notes
Permission Preflight does not:
- Grant permissions
- Bypass protections
- Disable claims
- Override server rules
- Force interactions to succeed
- Block actions by itself
It only reports what its available checks can determine.
Known limitations
- Without direct claim-mod adapters, some claim permissions cannot be predicted before the first attempted action.
- Some modded blocks may not expose enough vanilla information to classify every interaction perfectly.
- High latency can briefly delay overlay updates.
- Attack-entity checks are more limited than block and container checks.
- Unknown results are expected when no provider can verify the action.
Version
- Minecraft: 1.20.1
- Loader: Forge
- Forge: 47.4.20
- Java: 17
- Mod version: 1.0.0
- Mod ID:
permission_preflight
- License: MIT
- Creator: Iljas
评论 0
登录后参与评分
还没有评论,来抢沙发吧