? 限时旁观者
一款支持多加载器的 Minecraft 模组,引入了具有可配置限制的受限旁观模式。
支持的加载器: NeoForge ✅ • Fabric ✅ • Quilt ✅(仅限生产环境)
? 概览
Limited Spectator 允许玩家进入一个受控的旁观模式,限制他们在飞行和观察世界时能执行的操作。
与原版旁观模式不同,此版本允许按 F1 键显示 HUD,并限制交互以保留服务器或自定义世界的游戏平衡。
完美适用于:
• SMP 服务器;
• 希望在不拥有完整旁观权限的情况下进行视觉观察的建筑师。
✨ 特性
✅ 完全可配置的旁观模式
基于 TOML 的全面配置系统,允许服务器管理员自定义旁观行为的各个方面。
✅ 受限旁观模式
玩家可以进入自定义的旁观状态,允许自由飞行,但禁止使用物品栏、PvP 和世界交互。
✅ 灵活的移动距离限制
可配置从起始位置的最大移动距离(默认 75 格),或完全禁用。可选择传送回原位或警告行为。
✅ 可定制的方块交互
使用 Minecraft 方块 ID 精确定义玩家可以交互的方块。默认包括门、陷阱门和栅栏门。
✅ 细粒度的权限控制
为 /spectator 和 /survival 命令设置不同的权限等级(0-4),可选要求 OP 状态。
✅ 选择性 HUD 可见性
HUD 元素默认隐藏,但可以通过按 F1 键临时显示(可配置)。
✅ 维度旅行控制
可配置玩家在旁观模式下是否可以切换维度(下界、末地等)。
✅ 玩家位置重置
当超出距离限制或执行 /survival 命令时自动重置位置。
✅ 飞行能力
处于旁观模式的玩家可以通过双击空格键飞行。
✅ 战斗与交互限制
可单独切换 PvP、怪物攻击、物品丢弃/拾取以及物品栏合成。
✅ 热重载配置
所有设置均可在 config/limitedspectator-common.toml 中更改,并通过 /reload 命令重新加载。
✅ 对服务器友好
所有限制均在服务器端处理,以确保安全的多玩家行为。
✅ 多语言支持
完全支持 5 种欧洲语言的翻译(英语、意大利语、德语、法语、西班牙语)。
? 技术细节
| 方面 |
值 |
| 版本 |
2.0.0 |
| Minecraft |
1.21.1 → 1.21.11+(跨版本兼容) |
| 模组加载器 |
NeoForge ✅ • Fabric ✅ • Quilt ✅ |
| NeoForge |
21.1.217+ |
| Fabric Loader |
0.16.5+ |
| Fabric Loom |
1.7.3+ |
| Quilt Loader |
0.26.4+ |
| Quilt Loom |
1.7.3+(仅限生产环境) |
| Java |
21 |
| Mod ID |
limitedspectator |
⚙️ 命令
| 命令 |
描述 |
默认权限 |
/spectator |
切换到受限旁观模式 |
等级 0(所有人) |
/survival |
返回正常游戏并恢复 HUD |
等级 0(所有人) |
? 命令反馈消息已完全本地化为 5 种语言:英语、意大利语、德语、法语和西班牙语。
注意:权限等级可在配置文件中自定义。见下方的配置部分。
⚙️ 配置
Limited Spectator 具备全面的配置系统。首次启动时,配置文件会自动生成于:
位置:config/limitedspectator-common.toml
配置类别
? 移动限制
max_distance - 从起始位置的最大移动距离(默认:75.0 格,设为 -1 以禁用)
allow_dimension_travel - 允许在旁观模式下切换维度(默认:false)
teleport_back_on_exceed - 超出距离时是传送回原位还是发出警告(默认:true)
reset_position_on_logout - 登出时重置位置以防止滥用(默认:true)
? 玩家能力
enable_invulnerability - 使玩家无敌(保护免受怪物和环境伤害,但不防摔落伤害)(默认:true)
enable_flight - 允许在旁观模式下飞行(默认:true)
spectator_gamemode - 使用的游戏模式:"ADVENTURE" 或 "SPECTATOR"(默认:"ADVENTURE")
? 交互限制
allow_pvp - 允许攻击其他玩家(默认:false)
allow_item_drop - 允许丢弃物品(默认:false)
allow_item_pickup - 允许拾取物品(默认:false)
allow_inventory_crafting - 允许物品栏合成(2x2 网格)(默认:false)
interactable_blocks - 玩家可以交互的方块 ID 列表(默认:所有门、陷阱门、栅栏门)
注意:怪物攻击始终被禁用,因为怪物不会攻击具有 mayfly=true 能力的玩家(Minecraft 核心行为)。
? 命令权限
spectator_command_permission_level - /spectator 的权限等级(0-4,默认:0)
survival_command_permission_level - /survival 的权限等级(0-4,默认:0)
require_op_for_spectator - 旁观命令是否需要 OP 状态(默认:false)
?️ 客户端与 HUD 行为
- 进入旁观模式时 HUD 自动隐藏(硬编码)
- F1 键临时切换 HUD 可见性
? 消息设置
use_action_bar_messages - 在动作栏而非聊天栏显示消息(默认:true)
show_distance_warnings - 接近距离限制时显示警告(默认:true)
示例配置
拥有宽松旁观者模式的服务器:
[movement_restrictions]
max_distance = -1 # 无距离限制
allow_dimension_travel = true
[interactions]
allow_item_pickup = true # 允许拾取物品
interactable_blocks = ["minecraft:oak_door", "minecraft:lever", "minecraft:stone_button"]
严格生存模式服务器:
[permissions]
spectator_command_permission_level = 2 # 需要管理员等级
require_op_for_spectator = true
[movement_restrictions]
max_distance = 50.0 # 较短的距离限制
reset_position_on_logout = true # 防止登出滥用
所有配置更改均可通过 /reload 命令应用,无需重启服务器。
? 旁观者模式下的默认限制
注意:以下大多数限制可通过 config/limitedspectator-common.toml 进行配置
• ❌ 无法破坏或放置方块(由 ADVENTURE 模式强制执行——不可更改)
• ❌ 无法与箱子、床、工作台或物品进行交互(可通过方块白名单配置)
• ❌ 无法合成物品(2x2 网格)——材料会自动恢复(可配置)
• ❌ 无法穿越维度(可配置)
• ❌ 无法攻击生物(具有 mayfly 能力的生物不会被怪物锁定为目标)
• ❌ 无法进行 PvP(可配置)
• ❌ 无法丢弃或拾取物品(可单独配置)
• ✅ 门、陷阱门和栅栏门仍可交互(可通过方块 ID 完全自定义)
• ✅ F1 键切换 HUD 可见性(可配置)
• ✅ 距离限制:75 格(可配置,可禁用)
? 兼容性
• ✅ Minecraft 1.21.1+
• ✅ NeoForge 21.1.0+
• ✅ 支持多人联机
• ⚠️ Limited Spectator 使用标准的 NeoForge 事件钩子,应与大多数模组兼容。但是,深度改变玩家游戏模式处理或 HUD 渲染的模组可能会干扰其运行行为。
? 环境要求
Limited Spectator 是一个 服务器权威型 模组。Modrinth 上的“客户端和服务器”标签指的是该模组 可以 安装的位置,而非 必须 安装的位置。
| 安装位置 |
是否必需 |
结果 |
| 服务器 |
✅ 是 |
所有游戏限制(距离限制、物品丢弃/拾取、交互、攻击、维度穿越、命令权限)均在此处生效。若未安装在服务器上,模组无法工作。 |
| 客户端 |
⚪ 可选但强烈推荐 |
提供更丰富的用户体验:进入 /spectator 时自动隐藏 HUD,F1 键临时显示 HUD,以及与世界事件/交互更紧密的同步。 |
连接兼容性
- 原版客户端可以加入运行 Limited Spectator 的服务器。 所有限制仍在服务器端生效——玩家只是不会获得 HUD 隐藏的效果。
- 安装了 Limited Spectator 的客户端 将获得完整的预期体验(干净的 HUD、同步的事件)。
按加载器详细说明
- Fabric & Quilt 版本:目前不存在客户端代码,因此 JAR 文件实际上仅用于服务器。将其安装在客户端无害,但今天不会增加任何额外功能。
- NeoForge 版本:唯一的客户端部分是用于 HUD 同步的小型可选数据包处理器。网络通道注册为 可选,因此握手连接既可与模组客户端也能与原版客户端正常工作。
推荐设置
| 使用场景 |
服务器 |
客户端 |
| 包含原版访客的公共 SMP |
必需 |
原版即可,安装以获得完整体验 |
| 私用服务器,所有成员均已模组化 |
必需 |
双方都安装以获得最佳体验 |
| 单人测试 |
n/a |
必需(作为本地服务器运行) |
? 安装指南
? 选择您的加载器
下载适合您模组加载器的正确版本:
| 加载器 |
文件 |
备注 |
| NeoForge |
LimitedSpectator-neoforge-2.0.0.jar |
完整配置支持 |
| Fabric |
LimitedSpectator-fabric-2.0.0.jar |
硬编码默认值 |
| Quilt |
LimitedSpectator-quilt-2.0.0.jar |
使用 Fabric API |
安装步骤
- 安装您的模组加载器(NeoForge 21.1.217+ / Fabric 0.16.5+ / Quilt 0.26.4+)
- 将正确的 JAR 文件放入
mods/ 文件夹
- 启动 Minecraft
- (仅限 NeoForge) 配置文件自动生成于
config/limitedspectator-common.toml
- (仅限 NeoForge) 使用
/reload 命令重新加载更改
注意:Fabric 和 Quilt 版本使用硬编码默认值。配置系统计划在未来的版本中推出。
? 本地化
Limited Spectator 包含对最常见的欧洲语言的完整翻译支持:
支持的语言:
- ?? 英语 (en_us) - 基础语言
- ?? 意大利语 (it_it) - Italiano
- ?? 德语 (de_de) - Deutsch
- ?? 法语 (fr_fr) - Français
- ?? 西班牙语 (es_es) - Español
已翻译的消息:
- 命令反馈(
/spectator 和 /survival)
- 距离限制通知
- 错误消息(维度穿越、合成限制)
- 所有面向用户的文本
模组会自动检测您的 Minecraft 语言设置并相应显示消息。
⚠️ Minecraft ADVENTURE 模式的局限性
Limited Spectator 使用 Minecraft 的 ADVENTURE 模式(而非 SPECTATOR 模式)来防止穿墙,同时允许飞行。这一设计选择引入了一些固有的局限性:
核心局限性(设计使然)
这些不是 bug——它们是 Minecraft ADVENTURE 模式的基本限制,无法被覆盖:
-
手动激活飞行:玩家必须双击空格键才能开始飞行。自动启动飞行需要原版的 SPECTATOR 模式(这会启用穿墙功能)。
-
仅防摔落伤害:当 mayfly=true 时,Minecraft 引擎会完全阻止摔落伤害的计算。然而,enable_invulnerability=true 确实可以保护免受生物、熔岩、火焰、仙人掌和其他环境伤害。
-
方块破坏/放置已禁用:在 ADVENTURE(冒险)模式下,游戏模式层面会禁止所有建造行为。若不深入 Mixin 修改 Minecraft 核心引擎,则无法更改此限制。
为何存在这些限制
Limited Spectator 优先保证无需穿墙(noclip)的观察体验,而非功能上的面面俱到。启用原版 SPECTATOR(旁观者)模式将允许玩家:
- 穿透墙壁和方块(穿墙)
- 进入本不该看到的区域
- 绕过服务器防护机制
这些限制旨在保留模组的核心宗旨:为服务器提供平衡的旁观体验。
替代方案:使用旁观者模式
如果你需要完整的老版旁观者功能(无敌、穿墙等),请在配置文件中设置 spectator_gamemode = "SPECTATOR"。请注意,这将启用穿墙功能并降低多人服务器的安全性。
? 许可证
本项目采用 MIT 许可证授权。
详情请参阅 LICENSE 文件。
版权所有 (c) 2025 karashi
你可以自由使用、修改和分发此模组,前提是需保留署名。
? 项目链接
❤️ 鸣谢
• 作者:Karashi
• 开发:NeoForge 1.21.1 完全自定义代码库
• 图标设计:AI 生成的极简风格设计 (OpenAI)
• 特别感谢:Minecraft 及 NeoForge 社区
? 未来路线图
• ? 可选集成第三方权限系统(LuckPerms, FTB Chunks)
• ? 扩展 API 以支持自定义旁观者事件(SpectatorModeEnterEvent, SpectatorModeExitEvent)
• ? 持久化状态存储(跨服务器重启保存旁观者位置)
• ⏱️ 旁观者时间限制(可配置的最大旁观模式持续时间)
• ✨ 粒子效果或视觉边界用于距离限制
? Limited Spectator
A multi-loader Minecraft mod that introduces a restricted spectator mode with configurable limitations.
Supported Loaders: NeoForge ✅ • Fabric ✅ • Quilt ✅ (Production Only)
? Overview
Limited Spectator allows players to enter a controlled spectator mode that limits what they can do while flying and observing the world.
Unlike the vanilla spectator mode, this version allows to press F1 to show HUD and restricts interactions to preserve game balance on servers or custom worlds.
Perfect for:
• SMP;
• Builders who want visual observation without full spectator privileges.
✨ Features
✅ Fully Configurable Spectator Mode
Comprehensive TOML-based configuration system allowing server owners to customize every aspect of spectator behavior.
✅ Limited Spectator Mode
Players can enter a custom spectator state that allows free flight but prevents inventory use, PvP, and world interactions.
✅ Flexible Distance Limits
Configure maximum travel distance from start position (default 75 blocks) or disable it entirely. Choose between teleport-back or warning behavior.
✅ Customizable Block Interactions
Define exactly which blocks players can interact with using Minecraft block IDs. Default includes doors, trapdoors, and fence gates.
✅ Granular Permission Control
Set different permission levels (0-4) for /spectator and /survival commands, with optional OP requirement.
✅ Selective HUD Visibility
HUD elements remain hidden by default but can be temporarily shown by pressing F1 (configurable).
✅ Dimension Travel Control
Configure whether players can switch dimensions (Nether, End, etc.) while in spectator mode.
✅ Player Repositioning
Automatic position reset when exceeding distance limits or executing /survival command.
✅ Flight Capability
Players in spectator mode can fly by double-pressing the space bar.
✅ Combat & Interaction Restrictions
Individually toggle PvP, mob attacks, item drop/pickup, and inventory crafting.
✅ Hot-Reloadable Configuration
All settings can be changed in config/limitedspectator-common.toml and reloaded with /reload command.
✅ Server-Friendly
All restrictions are handled server-side for secure multiplayer behavior.
✅ Multilingual Support
Full translation support for 5 European languages (English, Italian, German, French, Spanish).
? Technical Details
| Aspect |
Value |
| Version |
2.0.0 |
| Minecraft |
1.21.1 → 1.21.11+ (cross-version compatible) |
| Mod Loaders |
NeoForge ✅ • Fabric ✅ • Quilt ✅ |
| NeoForge |
21.1.217+ |
| Fabric Loader |
0.16.5+ |
| Fabric Loom |
1.7.3+ |
| Quilt Loader |
0.26.4+ |
| Quilt Loom |
1.7.3+ (Production only) |
| Java |
21 |
| Mod ID |
limitedspectator |
⚙️ Commands
| Command |
Description |
Default Permission |
/spectator |
Switch to the limited spectator mode |
Level 0 (everyone) |
/survival |
Return to normal gameplay and restore the HUD |
Level 0 (everyone) |
? Command feedback messages are fully localized in 5 languages: English, Italian, German, French, and Spanish.
Note: Permission levels can be customized in the config file. See Configuration section below.
⚙️ Configuration
Limited Spectator features a comprehensive configuration system. On first launch, a config file is automatically generated at:
Location: config/limitedspectator-common.toml
Configuration Categories
? Movement Restrictions
max_distance - Maximum travel distance from start position (default: 75.0 blocks, -1 to disable)
allow_dimension_travel - Allow dimension changes in spectator mode (default: false)
teleport_back_on_exceed - Teleport back when exceeding distance vs. warning (default: true)
reset_position_on_logout - Reset position on logout to prevent abuse (default: true)
? Player Abilities
enable_invulnerability - Make players invulnerable (protects from mobs and environmental damage, not fall damage) (default: true)
enable_flight - Allow flight in spectator mode (default: true)
spectator_gamemode - GameMode to use: "ADVENTURE" or "SPECTATOR" (default: "ADVENTURE")
? Interaction Restrictions
allow_pvp - Allow attacking other players (default: false)
allow_item_drop - Allow dropping items (default: false)
allow_item_pickup - Allow picking up items (default: false)
allow_inventory_crafting - Allow inventory crafting (2x2 grid) (default: false)
interactable_blocks - List of block IDs players can interact with (default: all doors, trapdoors, gates)
Note: Mob attacks are always disabled because mobs don't target players with mayfly=true ability (Minecraft core behavior).
? Command Permissions
spectator_command_permission_level - Permission level for /spectator (0-4, default: 0)
survival_command_permission_level - Permission level for /survival (0-4, default: 0)
require_op_for_spectator - Require OP status for spectator commands (default: false)
?️ Client & HUD Behavior
- HUD automatically hides when entering spectator mode (hard-coded)
- F1 key toggles HUD visibility temporarily
? Message Settings
use_action_bar_messages - Show messages in action bar instead of chat (default: true)
show_distance_warnings - Show warnings when approaching distance limit (default: true)
Example Configurations
Server with relaxed spectator mode:
[movement_restrictions]
max_distance = -1 # No distance limit
allow_dimension_travel = true
[interactions]
allow_item_pickup = true # Allow picking up items
interactable_blocks = ["minecraft:oak_door", "minecraft:lever", "minecraft:stone_button"]
Strict survival server:
[permissions]
spectator_command_permission_level = 2 # Requires moderator rank
require_op_for_spectator = true
[movement_restrictions]
max_distance = 50.0 # Shorter distance limit
reset_position_on_logout = true # Prevent logout abuse
All configuration changes can be applied without restarting the server using /reload.
? Default Restrictions in Spectator Mode
Note: Most restrictions below are configurable via config/limitedspectator-common.toml
• ❌ No block breaking or placing (enforced by ADVENTURE mode - cannot be changed)
• ❌ No chest, bed, crafting table, or item interactions (configurable via block whitelist)
• ❌ No inventory crafting (2x2 grid) - ingredients restored automatically (configurable)
• ❌ No dimension travel (configurable)
• ❌ No mob attacks (mobs don't target players with mayfly ability)
• ❌ No PvP (configurable)
• ❌ No item dropping or pickup (individually configurable)
• ✅ Doors, trapdoors, and fence gates remain interactable (fully customizable via block IDs)
• ✅ F1 toggles HUD visibility (configurable)
• ✅ Distance limit: 75 blocks (configurable, can be disabled)
? Compatibility
• ✅ Minecraft 1.21.1+
• ✅ NeoForge 21.1.0+
• ✅ Multiplayer-safe
• ⚠️ Limited Spectator uses standard NeoForge event hooks and should be compatible with most mods. However, mods that deeply alter player gamemode handling or HUD rendering may interfere with its behavior.
? Environment Requirements
Limited Spectator is a server-authoritative mod. The Modrinth "Client and server" tag refers to where the mod can be installed, not where it is required.
| Where to install |
Required |
Result |
| Server |
✅ Yes |
All gameplay restrictions (distance limits, item drop/pickup, interactions, attacks, dimension travel, command permissions) are enforced here. The mod cannot function without being on the server. |
| Client |
⚪ Optional but highly recommended |
Enables a richer UX: HUD auto-hide when entering /spectator, F1 toggle for temporary HUD reveal, and tighter sync with world events/interactions. |
Connection compatibility
- Vanilla clients can join a server running Limited Spectator. All restrictions still apply server-side — players just won't get the HUD-hide effect.
- Clients with Limited Spectator installed get the full intended experience (clean HUD, synced events).
Per-loader detail
- Fabric & Quilt builds: no client-side code currently exists, so the JAR is effectively server-only. Installing it on the client is harmless but adds no extra features today.
- NeoForge build: the only client-side piece is a small optional packet handler for HUD sync. The network channel is registered as optional, so connection handshake works against both modded and vanilla clients.
Recommended setup
| Use case |
Server |
Client |
| Public SMP with vanilla guests |
Required |
Vanilla works, install for full UX |
| Private server, all members modded |
Required |
Install on both for best experience |
| Single-player testing |
n/a |
Required (acts as local server) |
? Installation
? Choose Your Loader
Download the correct version for your mod loader:
| Loader |
File |
Notes |
| NeoForge |
LimitedSpectator-neoforge-2.0.0.jar |
Full config support |
| Fabric |
LimitedSpectator-fabric-2.0.0.jar |
Hardcoded defaults |
| Quilt |
LimitedSpectator-quilt-2.0.0.jar |
Uses Fabric API |
Installation Steps
- Install your mod loader (NeoForge 21.1.217+ / Fabric 0.16.5+ / Quilt 0.26.4+)
- Place the correct JAR into your
mods/ folder
- Launch Minecraft
- (NeoForge only) Config file auto-generates at
config/limitedspectator-common.toml
- (NeoForge only) Reload changes with
/reload command
Note: Fabric and Quilt versions use hardcoded defaults. Configuration system planned for future release.
? Localization
Limited Spectator includes full translation support for the most common European languages:
Supported Languages:
- ?? English (en_us) - Base language
- ?? Italian (it_it) - Italiano
- ?? German (de_de) - Deutsch
- ?? French (fr_fr) - Français
- ?? Spanish (es_es) - Español
Translated Messages:
- Command feedback (
/spectator and /survival)
- Distance limit notifications
- Error messages (dimension travel, crafting restrictions)
- All user-facing text
The mod automatically detects your Minecraft language setting and displays messages accordingly.
⚠️ Minecraft ADVENTURE Mode Limitations
Limited Spectator uses Minecraft's ADVENTURE mode (instead of SPECTATOR mode) to prevent noclip while allowing flight. This design choice introduces some inherent limitations:
Core Limitations (By Design)
These are NOT bugs - they are fundamental restrictions of Minecraft's ADVENTURE mode that cannot be overridden:
-
Manual Flight Activation: Players must double-press spacebar to start flying. Auto-start flying requires vanilla SPECTATOR mode (which enables noclip).
-
Fall Damage Only: When mayfly=true, Minecraft's engine prevents fall damage calculation entirely. However, enable_invulnerability=true DOES protect against mobs, lava, fire, cacti, and other environmental damage.
-
Block Breaking/Placing Disabled: ADVENTURE mode blocks all building actions at the GameMode level. This cannot be changed without deep Mixins into Minecraft's core engine.
Why These Limitations Exist
Limited Spectator prioritizes observation without noclip over feature completeness. Enabling vanilla SPECTATOR mode would allow players to:
- Phase through walls and blocks (noclip)
- Access areas they shouldn't see
- Bypass server protections
These limitations preserve the mod's core purpose: balanced spectating for servers.
Alternative: Use SPECTATOR Mode
If you need full vanilla spectator features (invulnerability, noclip, etc.), set spectator_gamemode = "SPECTATOR" in the config. Note that this enables noclip and reduces security for multiplayer servers.
? License
This project is licensed under the MIT License.
See the LICENSE file for details.
Copyright (c) 2025 karashi
You may use, modify, and distribute this mod freely, provided that attribution is maintained.
? Project Links
❤️ Credits
• Author: Karashi
• Development: Full custom codebase for NeoForge 1.21.1
• Icon Design: AI-generated minimalist design (OpenAI)
• Special thanks: Minecraft & NeoForge community
? Future Roadmap
• ? Optional integration with third-party permission systems (LuckPerms, FTB Chunks)
• ? Extended API for custom spectator events (SpectatorModeEnterEvent, SpectatorModeExitEvent)
• ? Persistent state storage (save spectator positions across server restarts)
• ⏱️ Spectator time limits (configurable max duration in spectator mode)
• ✨ Particle effects or visual boundaries for distance limits
评论 0
登录后参与评分
还没有评论,来抢沙发吧