LsNightVision
一个轻量且可配置的 夜视切换插件,适用于 Minecraft 服务器。
LsNightVision 允许玩家(或管理员)通过简单的命令无限开启/关闭夜视效果。该插件旨在保持轻量、高度可配置,并兼容基于 Paper 的现代服务器。
功能
- 使用
/nv 切换无限夜视效果
- 切换其他玩家的夜视效果
- 可选的 死亡后与重连后保留 夜视状态
- 完全可配置的 操作栏消息
- 可选的 聊天消息
- 防止玩家用牛奶移除夜视效果
- 支持 十六进制颜色代码 (
&#ffffff) 和标准颜色代码 (&)
- 玩家名称自动补全
- 轻量且无依赖项
命令
/nv
切换自己的夜视效果。
/nv <player>
切换指定玩家的夜视效果。
/nvreload
重新加载插件配置。
权限
| 权限 |
描述 |
默认值 |
nightvision.use |
允许玩家切换自己的夜视效果 |
OP |
nightvision.other |
允许切换其他玩家的夜视效果 |
OP |
nightvision.reload |
允许重新加载插件配置 |
OP |
配置
插件的所有设置均可通过 config.yml 进行配置。
示例配置:
# 如果启用,玩家在切换夜视后,将在
# 死亡和重新连接服务器后保留该状态。
remember-toggle: true
# 如果为 true,夜视粒子将出现在玩家周围。
nv-particles: false
# 如果为 true,夜视图标将显示在玩家的 HUD 中。
nv-hud-icon: false
# 如果为 true,拥有夜视效果的玩家将无法通过
# 饮用牛奶来移除该效果。
prevent-milk-removal: true
# 操作栏消息。
action-bar:
enabled: true
enabled-self: "&a夜视已开启"
disabled-self: "&c夜视已关闭"
enabled-other: "7ff55已为 &f%player% 开启夜视"
disabled-other: "&#ff5555已为 &f%player% 关闭夜视"
# 聊天消息。
chat:
enabled: false
enabled-self: "&a夜视已开启"
disabled-self: "&c夜视已关闭"
enabled-other: "7ff55已为 &f%player% 开启夜视"
disabled-other: "&#ff5555已为 &f%player% 关闭夜视"
reload-message: "&aLsNightVision 配置已重新加载。"
工作原理
当玩家切换夜视效果时:
这确保了玩家能保持其选择的夜视状态。
兼容性
Minecraft 1.21+
安装
- 下载插件
.jar 文件
- 将其放入服务器的
plugins 文件夹
- 重启服务器
- 根据需要配置
config.yml
为什么选择 LsNightVision?
- 简单且轻量
- 完全可配置
- 支持现代 Minecraft 颜色格式
- 无需任何依赖
LsNightVision
A lightweight and configurable night vision toggle plugin for Minecraft servers.
LsNightVision allows players (or admins) to toggle infinite night vision with a simple command. The plugin is designed to be lightweight, configurable, and compatible with modern Paper-based servers.
Features
- Toggle infinite night vision with
/nv
- Toggle night vision for other players
- Optional persistent night vision after death and reconnect
- Fully configurable action bar messages
- Optional chat messages
- Prevent players from removing night vision with milk
- Supports hex colors (
&#ffffff) and standard color codes (&)
- Tab completion for player names
- Lightweight and dependency-free
Commands
/nv
Toggle your own night vision.
/nv <player>
Toggle night vision for another player.
/nvreload
Reload the plugin configuration.
Permissions
| Permission |
Description |
Default |
nightvision.use |
Allows players to toggle their own night vision |
OP |
nightvision.other |
Allows toggling night vision for other players |
OP |
nightvision.reload |
Allows reloading the plugin config |
OP |
Configuration
The plugin is fully configurable through config.yml.
Example configuration:
# If enabled, players who toggle night vision will keep it after
# death and when reconnecting to the server.
remember-toggle: true
# If true, Night Vision particles will appear around the player.
nv-particles: false
# If true, the Night Vision icon will appear in the player's HUD.
nv-hud-icon: false
# If true, players with toggled night vision cannot remove the effect
# by drinking milk.
prevent-milk-removal: true
# Action Bar Messages.
action-bar:
enabled: true
enabled-self: "&aNight vision enabled"
disabled-self: "&cNight vision disabled"
enabled-other: "7ff55Night vision enabled for &f%player%"
disabled-other: "&#ff5555Night vision disabled for &f%player%"
# Chat Messages.
chat:
enabled: false
enabled-self: "&aNight vision enabled"
disabled-self: "&cNight vision disabled"
enabled-other: "7ff55Night vision enabled for &f%player%"
disabled-other: "&#ff5555Night vision disabled for &f%player%"
reload-message: "&aLsNightVision configuration reloaded."
How it works
When a player toggles night vision:
-
The plugin applies an infinite NIGHT_VISION potion effect.
-
If remember-toggle is enabled, the plugin stores the player and reapplies night vision when they:
- rejoin the server
- respawn after death
This ensures players keep their chosen night vision state.
Compatibility
Minecraft 1.21+
Installation
- Download the plugin
.jar
- Place it in your server's
plugins folder
- Restart the server
- Configure
config.yml if desired
Why use LsNightVision?
- Simple and lightweight
- Fully configurable
- Supports modern Minecraft color formatting
- No dependencies required
评论 0
登录后参与评分
还没有评论,来抢沙发吧