视距控制
View Distance Control 允许为服务器上的不同玩家组设置不同的区块加载距离。可以将更大的视距作为捐赠者或 VIP 玩家的福利,限制访客以节省带宽,或者让插件自动降低空闲(AFK)玩家的视距并在他们返回时恢复。开始使用只需针对每个组执行一条 LuckPerms 命令;没有匹配权限的玩家将回退到配置中的默认值。
注意: 此插件控制的是向每位玩家 流式传输 的世界内容量,而非服务器加载的内容量。
玩家看到的区块变少了,但服务器仍保持相同的区域处于加载状态。如果你希望减轻服务器负载,请修改 server.properties 中的 simulation-distance 设置。
依赖项
- LuckPerms
- EssentialsX
- PlaceholderAPI
配置
plugins/ViewDistanceControl/config.yml:
default-view-distance: 10 # 默认视距
default-afk-view-distance: 4 # 默认空闲(AFK)视距
afk-view-distance-enable: true # 设置为 false 以禁用空闲视距降低功能
afk-distance-delay: 5 # 应用空闲视距前的秒数(0 = 立即生效)
notify-player: false # 当视距改变时通知玩家
notify-message: "Your view distance has been changed to %viewdistancecontrol_distance%"
console-log: false # 在控制台记录视距变化
debug: false # 记录用于诊断监听器触发的调试消息
notify-message 支持 & 颜色代码以及其他 PlaceholderAPI 占位符。
权限
| 节点 |
描述 |
viewdistancecontrol.default.<N> |
将正常视距设置为 N。授予的最高值生效。 |
viewdistancecontrol.afk.<N> |
将空闲(AFK)视距设置为 N。授予的最高值生效。 |
viewdistancecontrol.max.<N> |
将解析后的视距上限设为最多 N。授予的最低值生效。 |
viewdistancecontrol.reload |
允许使用 /vdc reload |
viewdistancecontrol.get |
允许使用 /vdc get <player> 和 /vdc list |
viewdistancecontrol.afkbypass |
绕过空闲视距降低 |
示例 — 为 VIP 组设置视距为 16:
lp group vip permission set viewdistancecontrol.default.16 true
示例 — 将受限组的视距上限锁定为最多 6 个区块,无论其他组的设置如何:
lp group restricted permission set viewdistancecontrol.max.6 true
注意: 视距受 server.properties 中 view-distance 的限制。如果设置的值大于 view-distance,则 view-distance 的值将生效。
PlaceholderAPI
| 占位符 |
描述 |
%viewdistancecontrol_distance% |
玩家当前的视距 |
命令
| 命令 |
描述 |
/vdc reload |
重新加载配置并为所有在线玩家重新应用视距 |
/vdc get <player> |
显示玩家的当前视距和空闲状态 |
/vdc list |
显示所有在线玩家的视距 |
View Distance Control
View Distance Control gives different chunk view distances to different groups of players on your server. Assign larger
distances as a perk for donors or VIPs, limit guests to save bandwidth, or let the plugin automatically pull back the
view distance for AFK players and restore it when they return. Getting started takes a single LuckPerms command per
group; players with no matching permission fall back to the defaults in config.
Note: This plugin controls how much of the world is streamed to each player, not how much the server loads.
Players see fewer chunks, but the server still keeps the same area loaded. If you want to reduce server load, lower
simulation-distance in server.properties instead.
Dependencies
- LuckPerms
- EssentialsX
- PlaceholderAPI
Configuration
plugins/ViewDistanceControl/config.yml:
default-view-distance: 10 # Fallback view distance
default-afk-view-distance: 4 # Fallback AFK view distance
afk-view-distance-enable: true # Set to false to disable AFK distance reduction
afk-distance-delay: 5 # Seconds before AFK distance applies (0 = immediate)
notify-player: false # Notify player when their view distance changes
notify-message: "Your view distance has been changed to %viewdistancecontrol_distance%"
console-log: false # Log view distance changes to the console
debug: false # Log debug messages for diagnosing listener triggers
The notify-message supports & color codes and other PlaceholderAPI placeholders.
Permissions
| Node |
Description |
viewdistancecontrol.default.<N> |
Sets normal view distance to N. Highest granted value wins. |
viewdistancecontrol.afk.<N> |
Sets AFK view distance to N. Highest granted value wins. |
viewdistancecontrol.max.<N> |
Caps the resolved view distance to at most N. Lowest granted value wins. |
viewdistancecontrol.reload |
Allows /vdc reload |
viewdistancecontrol.get |
Allows /vdc get <player> and /vdc list |
viewdistancecontrol.afkbypass |
Bypasses AFK view distance reduction |
Example — give a VIP group a view distance of 16:
lp group vip permission set viewdistancecontrol.default.16 true
Example — cap a restricted group to at most 6 chunks, regardless of other groups:
lp group restricted permission set viewdistancecontrol.max.6 true
Note: The view distance is capped by view-distance in server.properties. If a value greater than the
view-distance is set, the view-distnace would apply.
PlaceholderAPI
| Placeholder |
Description |
%viewdistancecontrol_distance% |
Player's current view distance |
Commands
| Command |
Description |
/vdc reload |
Reloads config and reapplies distances to all online players |
/vdc get <player> |
Shows a player's current view distance and AFK state |
/vdc list |
Shows all online players' view distances |
评论 0
登录后参与评分
还没有评论,来抢沙发吧