UltraPluginManager (UPM)
UltraPluginManager (UPM) 是一款适用于 Spigot 服务器(1.18.2+)的现代、安全且先进的插件管理系统。它是 PlugMan 的强力替代品,拥有清晰的架构、异步操作以及用户友好的图形界面。
✨ 特性
- 插件管理: 动态启用、禁用、重启、加载和卸载插件。
- 现代 GUI: 基于箱子界面的图形化插件管理工具,支持分页显示和状态指示器。
- 安全第一:
- 防止禁用关键插件(例如 Vault、ProtocolLib、WorldGuard)。
- 在禁用前检查依赖关系。
- 检测循环依赖。
- 异步操作: 重型操作(如加载/卸载)通过异步处理,以防止服务器卡顿。
- 多语言支持: 内置对英语 (
en) 和匈牙利语 (hu) 的支持,并可添加自定义语言文件。
- Tab 补全: 所有命令和文件名均支持完整的 Tab 键补全。
- Hex 颜色支持: 聊天和 GUI 格式支持精美的 Hex 颜色代码。
? 安装
- 确保你的服务器运行的是 Java 17 或更高版本。
- 下载
UPM.jar。
- 将 jar 文件放入服务器的
plugins 文件夹中。
- 重启服务器。
? 命令与权限
| 命令 |
别名 |
描述 |
权限 |
/upm |
|
显示帮助菜单。 |
upm.admin |
/upm list |
|
列出所有插件及其状态。 |
upm.list |
/upm enable <plugin> |
|
启用已禁用的插件。 |
upm.enable |
/upm disable <plugin> |
|
禁用已启用的插件。 |
upm.disable |
/upm reload <plugin> |
|
重载特定插件。 |
upm.reload |
/upm reload |
areload |
重载 UPM 配置文件。 |
upm.reload |
/upm load <file> |
|
从 plugins 文件夹加载一个 jar 文件。 |
upm.load |
/upm unload <plugin> |
|
从内存中卸载插件(请谨慎使用)。 |
upm.unload |
/upm info <plugin> |
|
显示详细信息(版本、作者、依赖)。 |
upm.info |
/upm gui |
|
打开插件管理器 GUI。 |
upm.gui |
/upm debug |
|
切换调试模式。 |
upm.debug |
通配符权限: upm.admin 授予对所有命令的访问权限。
⚙️ 配置
config.yml 允许你自定义插件的行为。
# 语言设置 (en, hu, 或自定义)
language: en
# 在控制台中切换调试消息
debug-mode: false
# GUI 标题
gui-title: "&9&lUPM &8- &bPlugin Manager"
# 无法通过 UPM 禁用/卸载的插件
protected-plugins:
- "Vault"
- "ProtocolLib"
- "LuckPerms"
- "WorldEdit"
- "WorldGuard"
- "UPM"
语言支持
UPM 默认生成 lang_en.yml 和 lang_hu.yml。要创建新语言:
- 复制
lang_en.yml 并重命名(例如 lang_it.yml)。
- 翻译其中的消息。
- 在
config.yml 中设置 language: it。
- 运行
/upm reload。
⚠️ 关于 unload 和 reload 的警告
虽然 UPM 使用高级技术来卸载插件(关闭 ClassLoaders、清除引用),但 Java 的架构使得在没有完全重启服务器的情况下进行“干净”卸载变得困难。
- 开发时使用
/upm reload: 它非常适合测试你自己插件中的小改动。
- 避免重载复杂的插件: 具有大量数据包使用(ProtocolLib)或复杂依赖注入的插件可能无法干净地重载。
- 内存泄漏: 反复加载/卸载插件 可能会 导致 Metaspace 内存随时间推移而泄漏。对于生产环境的更改,请务必重启服务器。
?? 开发者
由 Ywxlol 创建。
UltraPluginManager (UPM)
UltraPluginManager (UPM) is a modern, safe, and advanced plugin management system for Spigot servers (1.18.2+). It serves as a robust alternative to PlugMan, featuring a clean architecture, asynchronous operations, and a user-friendly GUI.
✨ Features
- Plugin Management: Enable, Disable, Restart, Load, and Unload plugins dynamically.
- Modern GUI: A chest-based GUI to manage plugins visually with pagination and status indicators.
- Safety First:
- Prevents disabling critical plugins (e.g., Vault, ProtocolLib, WorldGuard).
- Checks for dependencies before disabling.
- Detects circular dependencies.
- Async Operations: Heavy operations (like loading/unloading) are handled asynchronously to prevent server lag.
- Multi-Language Support: Built-in support for English (
en) and Hungarian (hu), with the ability to add custom language files.
- Tab Completion: Full tab completion for all commands and file names.
- Hex Color Support: Beautiful chat and GUI formatting with Hex color codes.
? Installation
- Ensure your server is running Java 17 or newer.
- Download the
UPM.jar.
- Place the jar file into your server's
plugins folder.
- Restart the server.
? Commands & Permissions
| Command |
Alias |
Description |
Permission |
/upm |
|
Shows the help menu. |
upm.admin |
/upm list |
|
Lists all plugins with their status. |
upm.list |
/upm enable <plugin> |
|
Enables a disabled plugin. |
upm.enable |
/upm disable <plugin> |
|
Disables an enabled plugin. |
upm.disable |
/upm reload <plugin> |
|
Reloads a specific plugin. |
upm.reload |
/upm reload |
areload |
Reloads the UPM configuration. |
upm.reload |
/upm load <file> |
|
Loads a jar file from the plugins folder. |
upm.load |
/upm unload <plugin> |
|
Unloads a plugin from memory (Use with caution). |
upm.unload |
/upm info <plugin> |
|
Shows detailed info (version, authors, deps). |
upm.info |
/upm gui |
|
Opens the Plugin Manager GUI. |
upm.gui |
/upm debug |
|
Toggles debug mode. |
upm.debug |
Wildcard Permission: upm.admin grants access to all commands.
⚙️ Configuration
The config.yml allows you to customize the plugin's behavior.
# Language setting (en, hu, or custom)
language: en
# Toggle debug messages in console
debug-mode: false
# GUI Title
gui-title: "&9&lUPM &8- &bPlugin Manager"
# Plugins that cannot be disabled/unloaded via UPM
protected-plugins:
- "Vault"
- "ProtocolLib"
- "LuckPerms"
- "WorldEdit"
- "WorldGuard"
- "UPM"
Language Support
UPM generates lang_en.yml and lang_hu.yml by default. To create a new language:
- Copy
lang_en.yml and rename it (e.g., lang_it.yml).
- Translate the messages.
- Set
language: it in config.yml.
- Run
/upm reload.
⚠️ Warning Regarding unload and reload
While UPM uses advanced techniques to unload plugins (closing ClassLoaders, clearing references), Java's architecture makes "clean" unloading difficult without a full server restart.
- Use
/upm reload for development: It is great for testing small changes in your own plugins.
- Avoid reloading complex plugins: Plugins with heavy packet usage (ProtocolLib) or complex dependency injections may not reload cleanly.
- Memory Leaks: Repeatedly loading/unloading plugins can lead to Metaspace memory leaks over time. Always restart your server for production changes.
?? Developer
Created by Ywxlol.
评论 0
登录后参与评分
还没有评论,来抢沙发吧