
SpecLock
Prevent spectator cheating on your server, lock spectators to their own team, restrict their range, and auto-teleport them if they stray too far
SpecLock
When a player is in Spectator Mode and belongs to a team, they can only spectate teammates, and they can only stay within a configurable block radius of them. Stray too far, try to fly off, or follow a teammate into another dimension, and you'll be snapped right back. Players with no team assigned are completely unrestricted.
Made to complement my Manhunt Plugin, or any scenario where you want spectators to still enjoy the spectating experience without being able to abuse it.
Features
- Team-based spectator locking: spectators can only use the hotbar menu to teleport to players on their own team(mate)
- Configurable radius: set the maximum distance a spectator can be from their teammates (default: 10 blocks)
- Auto-teleport enforcement: checked every second; if a spectator wanders too far they are instantly snapped back to the nearest teammate
- Cross-dimension follow: if a spectator's team(mate) moves to another dimension, the spectator is teleported with them
- No restrictions for teamless players: players not assigned to any team are fully unrestricted in spectator mode
- Persistent teams: teams and memberships survive server restarts
Commands
All commands require speclock.admin permission (usually just OP)
| Command | Description |
|---|---|
/sl team_add <name> | Create a new team |
/sl team_remove <name> | Delete a team and remove all its members |
/sl add <player> <team> | Add an online player to a team |
/sl remove <player> <team> | Remove an online player from a team |
/sl reset | Delete all teams and clear all memberships |
Configuration
Found in plugins/SpecLock/config.yml after first launch:
# The maximum distance (in blocks) a spectator can be from their alive teammates.
max-distance: 10.0
Change max-distance to any value you like, then restart or reload the server.
Technical Details
Built for Paper 1.21.1 but probably compatible with Spigot and maybe Bukkit, message qpso on Discord for bugs or suggestions.
