🌙 OmegaNightVision
一款轻量级、完全可配置的夜视插件,允许玩家通过一条命令切换永久夜视效果。
只需使用 /nv 即可启用或禁用夜视。玩家的偏好设置会自动保存,使他们能够在断开连接和服务器重启后保持夜视状态,而无需再次手动切换。
OmegaNightVision 具备 SQLite 持久化存储、可配置的牛奶行为、多种消息发送渠道以及完全自定义的消息内容,在不依赖其他插件的情况下提供简单可靠的解决方案。
📋 要求
- 服务端软件:Paper(推荐)或 Spigot
- Minecraft 版本:1.16 至 1.21.4+
- Java 版本:21
- 依赖项:无。无需外部插件。
✨ 功能
🌙 无限夜视
- 一键切换:使用
/nv 立即启用或禁用夜视。
- 无限持续时间:使用
PotionEffect.INFINITE_DURATION,确保效果不会自然过期。
- 命令别名:还支持
/nightvision 和 /nightv。
💾 持久化玩家数据
- SQLite 数据库:玩家的夜视偏好设置会自动保存到本地 SQLite 数据库中。
- 自动恢复:当玩家重新加入时,夜视效果会自动重新应用。
- 支持重启:服务器重启期间保留玩家的偏好设置。
- 异步操作:所有数据库读写均在异步线程中运行,以防止不必要的主线程卡顿。
- 自动权限清理:如果玩家在没有
omeganightvision.use 权限的情况下重新加入,其保存的数据库记录将被自动移除。
🥛 牛奶免疫
选择饮用牛奶是否应移除夜视效果。
- 默认启用以保留原版行为。
- 设置
milk-removes-nightvision: false 以防止牛奶移除夜视效果。
- 禁用后,饮用牛奶后效果会自动重新应用。
💬 可自定义的消息系统
配置玩家接收插件消息的具体方式。
每条消息都支持三种独立的发送渠道:
- 聊天:直接将消息发送到聊天栏。
- 动作条:在快捷栏上方显示消息。
- 标题:在屏幕上显示自定义标题和副标题。
可以同时启用这些渠道的任何组合。
所有消息均可在 config.yml 中进行完全编辑,包括:
- 夜视已启用。
- 夜视已禁用。
- 没有权限。
- 配置重载确认。
支持旧版 Minecraft 颜色代码,包括 &a、&c 和 &8。
⚙️ 配置与管理
- 实时配置重载:使用
/nv reload 重新加载配置并重建消息管理器,无需重启服务器。
- 可配置的持久化:通过
database.enabled 启用或禁用 SQLite 存储。
- 可自定义的消息:独立配置聊天、动作条和标题消息。
- 基于权限的访问控制:控制谁可以切换夜视和重载配置。
🧹 自动清理
- 当插件被禁用时,所有在线玩家的活跃夜视效果都会被移除。
- 防止插件关闭后残留药水效果。
- 玩家重新连接时自动恢复保存的玩家偏好设置。
⚡ 轻量级且无依赖
OmegaNightVision 旨在高效地完成一项工作。
- 无外部插件依赖。
- 内置 Java 的 SQLite 支持。
- 异步数据库操作。
- 资源占用极低。
- 兼容 Paper 和 Spigot。
⌨️ 命令
| Command | Aliases | Description | Permission |
| ------------ | --------------------------------------- | -------------------------------- | ------------------------- |
| `/nv` | `/nightvision`, `/nightv` | Toggle Night Vision on or off. | `omeganightvision.use` |
| `/nv reload` | `/nightvision reload`, `/nightv reload` | Reload the plugin configuration. | `omeganightvision.reload` |
🔐 权限
| Permission | Description | Default |
| ------------------------- | -------------------------------------------------- | ------- |
| `omeganightvision.use` | Allows players to toggle Night Vision using `/nv`. | `true` |
| `omeganightvision.reload` | Allows players to reload the configuration. | `op` |
✨ 图片
添加 Omega NightVision 之前:

添加 Omega NightVision 之后:

🌙 OmegaNightVision
A lightweight, fully configurable Night Vision plugin that allows players to toggle permanent Night Vision with a single command.
Simply use /nv to enable or disable Night Vision. Player preferences are automatically saved, allowing them to retain their Night Vision across disconnects and server restarts without needing to toggle it again.
Featuring SQLite persistence, configurable milk behaviour, multiple message delivery channels and fully customisable messages, OmegaNightVision provides a simple and reliable solution without unnecessary dependencies.
📋 Requirements
- Server Software: Paper (recommended) or Spigot
- Minecraft Versions: 1.16 to 1.21.4+
- Java Version: 21
- Dependencies: None. No external plugins required.
✨ Features
🌙 Infinite Night Vision
- One-command toggle: Use
/nv to instantly enable or disable Night Vision.
- Infinite duration: Uses
PotionEffect.INFINITE_DURATION, ensuring the effect never expires naturally.
- Command aliases:
/nightvision and /nightv are also supported.
💾 Persistent Player Data
- SQLite Database: Player Night Vision preferences are automatically saved to a local SQLite database.
- Automatic restoration: Night Vision is automatically reapplied when players rejoin.
- Restart support: Player preferences are preserved across server restarts.
- Asynchronous operations: All database reads and writes run asynchronously to prevent unnecessary main-thread lag.
- Automatic permission cleanup: If a player rejoins without the
omeganightvision.use permission, their saved database record is automatically removed.
🥛 Milk Immunity
Choose whether drinking milk should remove Night Vision.
- Enabled by default to preserve vanilla behaviour.
- Set
milk-removes-nightvision: false to prevent milk from removing Night Vision.
- When disabled, the effect is automatically reapplied after drinking milk.
💬 Customisable Message System
Configure exactly how players receive plugin messages.
Every message supports three independent delivery channels:
- Chat: Send messages directly into chat.
- Action Bar: Display messages above the hotbar.
- Title: Display custom titles and subtitles on screen.
Enable any combination of these channels simultaneously.
All messages are fully editable in config.yml, including:
- Night Vision enabled.
- Night Vision disabled.
- No permission.
- Configuration reload confirmation.
Supports legacy Minecraft colour codes, including &a, &c and &8.
⚙️ Configuration & Management
- Live configuration reload: Use
/nv reload to reload the configuration and rebuild the message manager without restarting the server.
- Configurable persistence: Enable or disable SQLite storage through
database.enabled.
- Customisable messages: Independently configure chat, action bar and title messages.
- Permission-based access: Control who can toggle Night Vision and reload the configuration.
🧹 Automatic Cleanup
- Active Night Vision effects are removed from all online players when the plugin is disabled.
- Prevents leftover potion effects after plugin shutdown.
- Automatically restores saved player preferences when they reconnect.
⚡ Lightweight & Dependency-Free
OmegaNightVision is designed to do one job efficiently.
- No external plugin dependencies.
- SQLite support bundled with Java.
- Asynchronous database operations.
- Minimal resource usage.
- Compatible with Paper and Spigot.
⌨️ Commands
| Command | Aliases | Description | Permission |
| ------------ | --------------------------------------- | -------------------------------- | ------------------------- |
| `/nv` | `/nightvision`, `/nightv` | Toggle Night Vision on or off. | `omeganightvision.use` |
| `/nv reload` | `/nightvision reload`, `/nightv reload` | Reload the plugin configuration. | `omeganightvision.reload` |
🔐 Permissions
| Permission | Description | Default |
| ------------------------- | -------------------------------------------------- | ------- |
| `omeganightvision.use` | Allows players to toggle Night Vision using `/nv`. | `true` |
| `omeganightvision.reload` | Allows players to reload the configuration. | `op` |
✨ Images
Before adding Omega NightVision:

After adding Omega NightVision:

评论 0
登录后参与评分
还没有评论,来抢沙发吧