HotPlug
将插件的 jar 文件放入 plugins/ 目录即可直接生效,无需重启服务器。
HotPlug 会监控你的插件文件夹,自动加载新插件,并允许你通过一条命令重新加载任意插件。更新插件不再意味着需要踢出所有玩家。
功能特性
- 自动加载新插件。 通过 SFTP 或主机控制面板上传 jar 文件后,HotPlug 会在几秒内加载并启用它。它会等待上传完成,因此绝不会加载未完整复制的文件。
- 按需重新加载。 可以重新加载单个插件、多个插件或一次性重新加载所有插件。
- 依赖感知。 如果你重新加载了其他插件所依赖的插件,那些依赖它的插件会先被卸载,然后按正确的顺序重新加载。
- 默认安全。 排除列表中的插件(默认包含 AuthMe、SkinsRestorer 和 voicechat)永远不会被触及。如果某些插件无法安全地重新加载,HotPlug 会提示需要重启服务器,而不是导致服务器出错。
- 安静运行。 仅在发生事件时通知控制台和管理员(拥有相应权限者)。
- 开箱即用。支持英文和俄文消息。
命令
权限:hotplug.use(默认 OP 可用)。别名:/hp。
| 命令 |
作用 |
/hotplug |
加载新的 jar 文件并重新加载已更改的插件 |
/hotplug <plugin> [plugin...] |
重新加载指定的插件,或通过名称加载新的 jar 文件 |
/hotplug all |
重新加载除排除列表中的插件之外的所有插件 |
/hotplug list |
显示插件状态:已更改的 jar、新 jar、已排除的插件 |
/hotplug config |
重新加载 HotPlug 自身的配置文件 |
配置
language: en # ru | en
auto:
enabled: true
interval-seconds: 5
load-new: true # 自动加载 NEW(新)jar 文件
reload-changed: false # false = 仅在替换 jar 时发送通知
notify: true
exclude:
- AuthMe
- SkinsRestorer
- voicechat
默认情况下,替换 jar 文件仅发送通知,你需要使用 /hotplug <plugin> 手动重新加载插件。设置 reload-changed: true 以自动重新加载已更改的插件。
须知
在运行时重新加载插件对每个插件来说都不可能做到 100% 安全。保留静态状态或深度挂钩到其他插件的插件在重新加载后可能会出现异常行为。将这些插件添加到 exclude 列表中,并为它们重启服务器。请先在你的服务器副本上进行测试。
要求
Paper 26.3 或其分支版本。Java 21 或更高版本。
支持
发现问题?请提交 Issue 并提供你的 Paper 版本和控制台输出。
По-русски
Положи jar в plugins/ — плагин заработает без перезапуска сервера.
HotPlug сам следит за папкой плагинов, загружает новые jar и перезагружает плагины одной командой. Команды: /hotplug, /hotplug <плагин> [...], /hotplug all, /hotplug list, /hotplug config. Язык сообщений меняется в config.yml (language: ru).
HotPlug
Drop a plugin jar into plugins/ and it just works. No server restart.
HotPlug watches your plugins folder, loads new plugins automatically, and lets you reload any plugin with a single command. Updating a plugin no longer means kicking everyone off the server.
Features
- Auto-load new plugins. Upload a jar by SFTP or your hosting panel and HotPlug loads and enables it within seconds. It waits until the upload is finished, so half-copied files are never loaded.
- Reload on demand. Reload one plugin, several at once, or everything with one command.
- Dependency-aware. If you reload a plugin that others depend on, those are unloaded first and loaded again in the correct order.
- Safe by default. Plugins in the exclude list (AuthMe, SkinsRestorer and voicechat out of the box) are never touched. If something can't be reloaded safely, HotPlug says a restart is needed instead of breaking your server.
- Quiet. Only the console and admins with the permission are notified, and only when something happens.
- Works out of the box. Messages in English and Russian.
Commands
Permission: hotplug.use (OP by default). Alias: /hp.
| Command |
What it does |
/hotplug |
Load new jars and reload changed ones |
/hotplug <plugin> [plugin...] |
Reload the selected plugins, or load a new jar by name |
/hotplug all |
Reload every plugin except the excluded ones |
/hotplug list |
Show plugin status: changed jar, new jar, excluded |
/hotplug config |
Reload HotPlug's own config |
Configuration
language: en # ru | en
auto:
enabled: true
interval-seconds: 5
load-new: true # load NEW jars automatically
reload-changed: false # false = only notify when a jar is replaced
notify: true
exclude:
- AuthMe
- SkinsRestorer
- voicechat
By default, replacing a jar only sends a notification, and you reload the plugin yourself with /hotplug <plugin>. Set reload-changed: true to reload changed plugins automatically.
Good to know
Reloading plugins at runtime can't be 100% safe for every plugin. Plugins that keep static state or hook deeply into other plugins may misbehave after a reload. Add those to the exclude list and restart the server for them. Test on a copy of your server first.
Requirements
Paper 26.3 or a fork of it. Java 21 or newer.
Support
Found a problem? Open an issue and include your Paper version and the console output.
По-русски
Положи jar в plugins/ — плагин заработает без перезапуска сервера.
HotPlug сам следит за папкой плагинов, загружает новые jar и перезагружает плагины одной командой. Команды: /hotplug, /hotplug <плагин> [...], /hotplug all, /hotplug list, /hotplug config. Язык сообщений меняется в config.yml (language: ru).
评论 0
登录后参与评分
还没有评论,来抢沙发吧