-
Notifications
You must be signed in to change notification settings - Fork 0
For Server Admins
This guide is specifically for server administrators deploying Limited Spectator in production environments. It covers best practices, security considerations, and deployment strategies.
Important: Configuration examples on this page are for Beta v1.1.0 only.
You cannot customize settings via config file. All values are hardcoded:
- Distance: 75 blocks (fixed)
- Permissions: Level 0 - all players (fixed)
- Interactions: Doors, trapdoors, gates only (fixed)
- All other settings: Default values (fixed)
To customize behavior, you must:
- Wait for stable v1.1.0 release, OR
- Use Beta v1.1.0 on a test server first
All configuration examples below are available. Test thoroughly before deploying to production.
Note: These configurations require Beta v1.1.0. Stable v1.0.2 uses fixed defaults.
Goal: Minimize spectator advantages, prevent scouting
Recommended Config:
[movement]
max_distance = 50.0
allow_dimension_travel = false
teleport_back_on_exceed = true
reset_position_on_logout = true
[interactions]
allow_pvp = false
allow_item_drop = false
allow_item_pickup = false
allow_inventory_crafting = false
interactable_blocks = []
[commands]
spectator_command_permission_level = 2
require_op_for_spectator = true
[messages]
use_action_bar_messages = true
show_distance_warnings = trueRationale:
- Tight 50-block radius prevents long-range scouting
- No interactions prevent cheating assistance
- OP-only access ensures only trusted staff can spectate
- Position reset prevents teleport exploits
Goal: Allow helpful spectating without breaking gameplay
Recommended Config:
[movement]
max_distance = 150.0
allow_dimension_travel = false
teleport_back_on_exceed = true
reset_position_on_logout = true
[interactions]
allow_pvp = false
allow_item_drop = false
allow_item_pickup = true
allow_inventory_crafting = false
interactable_blocks = [
"minecraft:oak_door",
"minecraft:stone_button",
"minecraft:lever"
]
[commands]
spectator_command_permission_level = 0
require_op_for_spectator = false
[messages]
use_action_bar_messages = true
show_distance_warnings = trueRationale:
- 150-block radius allows base exploration
- Mob attacks enabled so spectators can help with defense
- Item pickup allowed for loot collection
- Open access for all players
- Still prevents griefing (no block breaking/placing)
Goal: Allow flexible spectating for design review
Recommended Config:
[movement]
max_distance = 500.0
allow_dimension_travel = true
teleport_back_on_exceed = false
reset_position_on_logout = false
[interactions]
allow_pvp = false
allow_item_drop = true
allow_item_pickup = true
allow_inventory_crafting = true
interactable_blocks = [
"minecraft:oak_door",
"minecraft:chest",
"minecraft:lever",
"minecraft:oak_button"
]
[commands]
spectator_command_permission_level = 0
require_op_for_spectator = false
[messages]
show_distance_warnings = falseRationale:
- Large 500-block radius for big builds
- Dimension travel for Nether/End builds
- Warnings only (no forced teleport)
- Item interactions for inventory management
- Block breaking still disabled to prevent griefing
Goal: Allow spectating for AFK/idle players
Recommended Config:
[movement]
max_distance = 100.0
allow_dimension_travel = false
teleport_back_on_exceed = true
reset_position_on_logout = true
[player_abilities]
enable_invulnerability = true
enable_flight = true
[interactions]
allow_pvp = false
allow_item_drop = false
allow_item_pickup = false
allow_inventory_crafting = false
interactable_blocks = ["minecraft:oak_door"]
[commands]
spectator_command_permission_level = 0
require_op_for_spectator = false
Rationale:
- Moderate distance for temporary observation
- Full invulnerability for AFK safety
- Minimal interactions (doors only)
- Public access for all players
- HUD automatically hidden (F1 to toggle)
Set appropriate permission levels based on server trust:
# Public servers (untrusted players)
spectator_command_permission_level = 2
require_op_for_spectator = true
# Semi-private servers (trusted community)
spectator_command_permission_level = 1
require_op_for_spectator = false
# Private servers (friends/family)
spectator_command_permission_level = 0
require_op_for_spectator = falseFor temporary access without full OP:
-
Give OP temporarily:
/op <player> [Player uses /spectator] /deop <player> -
Or reduce permission requirement:
spectator_command_permission_level = 0
Then change it back after.
-
Or use permission mods (future feature).
Exploit: Player uses /spectator, flies near limit, logs out, logs back in at edge, uses /survival to "teleport"
Prevention:
[movement]
reset_position_on_logout = trueThis forces players back to starting position on logout.
Exploit: Player uses Nether to travel 8x distance (coordinate scaling)
Prevention:
[movement]
allow_dimension_travel = falseExploit: Spectator drops items to help other players
Prevention:
[interactions]
allow_item_drop = false
allow_item_pickup = falseThe mod properly handles item drops by cancelling the event and restoring the item to inventory.
Risk: Using vanilla SPECTATOR gamemode allows phasing through walls
Prevention:
[abilities]
spectator_gamemode = "ADVENTURE"Default ADVENTURE mode prevents noclip while allowing flight.
Limited Spectator logs all spectator mode changes:
[LimitedSpectator] Player entered spectator mode at (123.45, 64.0, -678.90)
[LimitedSpectator] Player exited spectator mode
[LimitedSpectator] Player exceeded distance limit (current: 85.3, max: 75.0)
Monitoring Tips:
- Watch for frequent spectator mode switches (potential exploit attempts)
- Track distance violations (may indicate bypass attempts)
- Log spectator entries during PvP events (potential unfair advantage)
Create a log parser to track spectator usage:
#!/bin/bash
# spectator-monitor.sh
grep "LimitedSpectator" logs/latest.log | grep "entered spectator" | awk '{print $4, $5, $6}'This extracts all spectator entries with timestamps.
Limited Spectator may trigger anti-cheat plugins due to flight. Configure your anti-cheat:
Add to config.yml:
checks:
moving:
survivalfly:
active: falseOr exempt spectators:
permissions:
- 'nocheatplus.checks.moving.survivalfly'Whitelist Limited Spectator:
Checks:
Flight:
enabled: falseLimited Spectator does not yet integrate with permission plugins, but you can work around this:
Use command aliases to require permissions:
- Install a command alias plugin
- Create alias that checks permission, then runs
/spectator
Future versions will have native LuckPerms support.
Limited Spectator respects server-side block interaction events, so plugins like:
- FTB Chunks: Claimed areas block spectator interactions
- GriefPrevention: Protected areas remain protected
- WorldGuard: Region flags apply to spectators
Testing: Ensure spectators cannot interact with protected blocks.
No direct integration needed, but consider:
- Charging for spectator access via economy plugins
- Restricting spectator mode to premium members
Implementation: Use permission levels + economy plugin rewards.
Limited Spectator has minimal performance impact:
- Per-tick overhead: ~0.01ms per spectator (distance check)
- Memory usage: ~200 bytes per spectator (position storage)
- Network usage: ~10 bytes per HUD packet
Test with Spark profiler:
/spark profiler start
[Players use spectator mode]
/spark profiler stop
Look for SpectatorMod.onPlayerTick in results.
For servers with 100+ simultaneous spectators, consider modifying the code to check distance every 5 ticks instead of every tick:
// In SpectatorMod.java
if (serverPlayer.tickCount % 5 == 0) {
// Distance check logic
}This reduces overhead by 80% with minimal impact on enforcement.
Instead of max_distance = -1.0 (unlimited), use a very large value:
max_distance = 10000.0This provides soft limits without disabling the feature, allowing future enforcement if needed.
Always backup config before updates:
cp config/limitedspectator-common.toml config/limitedspectator-common.toml.backupRestore if update breaks config:
cp config/limitedspectator-common.toml.backup config/limitedspectator-common.tomlWhen updating Limited Spectator:
- Read Changelog: Check for breaking changes
- Backup Config: Save current config
- Test on Development Server: Never update directly on production
- Compare Configs: Check for new config options
- Update Production: Once tested, deploy to production
If an update causes issues:
- Stop the server
- Replace JAR with previous version
- Restore config backup
- Restart server
- Report bug on GitHub
Goal: Allow spectators for 5 minutes, then auto-kick
Implementation: Use a scheduled task plugin
# With CommandTimer or similar
tasks:
- command: "/execute as @a[gamemode=adventure] run survival"
interval: 300 # 5 minutesFuture: Native time limits planned.
Goal: Restrict spectator mode to specific regions
Implementation: Use WorldGuard + command restrictions
- Create region:
/region define spectator-zone - Allow
/spectatoronly in region using command filtering
Workaround: Not natively supported yet.
Goal: Limit spectators to 5 at a time
Implementation: External queue system
- Track spectator count with a plugin
- Only allow
/spectatorif count < 5 - Auto-kick oldest spectator when limit reached
Future: Native spectator limits planned.
Goal: VIP members get 200-block radius, regular members get 75
Implementation: Not supported in current version
Workaround:
- Create two separate servers with different configs
- Use permission plugin + command override
- Wait for future update with per-player limits
Diagnosis:
- Check player's game mode:
/data get entity <player> playerGameType - Check abilities:
/data get entity <player> abilities - Check server logs for errors during spectator entry
Solutions:
- Force game mode change:
/gamemode survival <player> - Teleport to spawn:
/tp <player> <spawn coordinates> - Kick and rejoin:
/kick <player> Spectator mode reset
Diagnosis:
- Check config:
max_distancevalue - Check if
/reloadwas run after config change - Verify mod is loaded: grep logs for "LimitedSpectator"
Solutions:
- Reload config:
/reload - Restart server
- Verify TOML syntax (use online validator)
Note: Block breaking and placing are always disabled in ADVENTURE mode at the GameMode level. This cannot be changed or configured.
If spectators can break blocks, they are likely not in Limited Spectator mode. Verify with:
- Check if player is in spectator mode (
/spectatorwas used) - Verify
spectator_gamemode = "ADVENTURE"in config - Check for mod conflicts overriding game modes
- Check logs for event cancellation messages
Post these rules in your server documentation:
- No Scouting: Don't use spectator mode to scout enemy bases in PvP
- No Ghosting: Don't share info from spectator mode in voice chat
- No Exploit Attempts: Don't try to bypass distance limits or restrictions
- Respectful Spectating: Don't harass players while spectating
- Time Limits: Spectator mode is for temporary observation only (if applicable)
-
Warnings: Use
/warn <player>(if using moderation plugin) -
Temp Ban:
/ban <player> 1d Spectator mode abuse -
Remove Access: Change config to
require_op_for_spectator = true
For networks with multiple servers (BungeeCord, Velocity):
Considerations:
- Each server has independent config
- Spectator state does NOT transfer between servers
- Player switching servers exits spectator mode
Recommended Setup:
- Use identical configs across all servers
- Document that spectator mode is per-server
- Consider adding
/spectatorto each server's help text
For admin-specific questions:
- Check this guide first
- Review Configuration Guide
- Search GitHub Issues
- Open new issue with "Server Admin" tag
DO NOT report security vulnerabilities publicly. Email: [your email] or open a private security advisory on GitHub.
Admins can contribute by:
- Testing beta releases on test servers
- Suggesting features based on real-world usage
- Reporting compatibility issues with other mods
- Documenting advanced configurations
See CONTRIBUTING.md for contribution guidelines.
Before deploying Limited Spectator to production:
- Tested on development server
- Config customized for server type
- Permission levels set appropriately
- Anti-cheat configured to allow spectator flight
- Server rules updated with spectator guidelines
- Backup of config created
- Staff trained on
/spectatorand/survivalcommands - Players notified of new feature
- Monitoring set up for spectator logs
- Rollback plan documented
Need more help? Open an issue or check the FAQ.