SpecLock
当玩家处于旁观者模式并属于某个队伍时,他们只能旁观自己的队友,并且只能在可配置的方块半径内跟随。如果偏离太远、试图飞离或跟随队友进入其他维度,系统会立即将其拉回。未分配任何队伍的玩家则完全不受限制。
本插件旨在配合我的 Manhunt Plugin 使用,或适用于任何希望旁观者能享受旁观体验却无法滥用该模式的场景。
功能
- 基于队伍的旁观锁定:旁观者只能通过快捷栏菜单传送到自己队伍(队友)中的玩家
- 可配置半径:设置旁观者与队友之间的最大距离(默认:10 个方块)
- 自动传送执行:每秒检查一次;如果旁观者走得太远,会被瞬间拉回到最近的队友身边
- 跨维度跟随:如果旁观者的队友移动到另一个维度,旁观者也会被传送过去
- 无队伍玩家无限制:未分配到任何队伍的玩家在旁观者模式下完全不受限制
- 持久化队伍:队伍及其成员信息会在服务器重启后保留
命令
所有命令都需要 speclock.admin 权限(通常仅为 OP)
| 命令 |
描述 |
/sl team_add <name> |
创建新队伍 |
/sl team_remove <name> |
删除队伍并移除其所有成员 |
/sl add <player> <team> |
将在线玩家添加到队伍 |
/sl remove <player> <team> |
从队伍中移除在线玩家 |
/sl reset |
删除所有队伍并清除所有成员关系 |
配置
首次启动后位于 plugins/SpecLock/config.yml:
# 旁观者与存活队友之间的最大距离(以方块为单位)。
max-distance: 10.0
将 max-distance 更改为你喜欢的任何值,然后重启或重载服务器即可。
技术细节
专为 Paper 1.21.1 构建,但可能兼容 Spigot 和 Bukkit。如有错误或建议,请在 Discord 上联系 qpso。
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.
评论 0
登录后参与评分
还没有评论,来抢沙发吧