插件介绍
这是一款全新的服务器插件管理插件。不知道为什么,此前从未有人搬运过该插件帖。随着 YUM 退出插件舞台,我们也越来越需要一个更好、更强大的管理插件。在这种情况下,我们强大的 ServerUtils 就诞生了。
本插件基于 GNU General Public License v3.0 分发策略。
授权搬运!
 原一次搬运作者已授权
插件特色
| 1. 兼容超多服务端核心,包括但不限于 Spigot / Paper, BungeeCord / Waterfall 甚至是 Velocity! | 2. 替换原 Bukkit 注册的 /pl 和 /plugins 命令,显示更美观,可自定义程度更高。 | 2. 加上 -v 参数可使插件列表显示版本号! | 2. 与此同时,我们没有替换 /bukkit:pl 和 /bukkit:plugins 命令,所以你可以放心地使用原命令而不受干扰。 | 3. 对于 BungeeCore 及其分支服务端核心,有独立的 /bpl 命令供你管理这些插件! | 3. -v 参数同样可用于输出带版本号的插件列表,而 -m 参数可用于输出插件附带的模块(如 cmd_send.jar, cmd_server.jar 等)。 | 4. 使用命令 /su (reload/unload/load)plugin <插件名称> 来快速重载/载入/卸载插件(BungeeCord 下该命令为 /bsu)! | 4. 同时支持 TAB 键自动补全插件名称以快速重载或卸载插件! | 5. 使用命令 /su watchplugin 命令来监视插件配置文件夹的变动并即刻重载! | 6. (仅支持 Spigot / Paper)卸载不常用命令:你可在配置文件中设置哪些注册的命令将在启动时被 ServerUtils 卸载。 | 6. 这些命令被卸载后将不可以被玩家或是服务器控制台使用。 | 7. 重载插件并有效刷新已注册内容,例如 PluginClassLoader 和服务器内注册的合成配方。但基于实现方法,合成配方的刷新仅支持 1.12+。 | 7. 在低于此版本的服务器核心环境中,本插件无从知晓配方由哪个插件注册,因此也无法管理它们。 | 8. 一个有较强自我管理意识的插件管理器是可以重载或卸载自己的。接招吧,Plugman! | 9. 可在服务器运行时快速重载 connamds.yml 而不用重启服务器!做等价命令或是包装命令的时候这项会很有用! | 9. 请注意,这个功能现在只支持 1.8-1.16! | 10. 快速重载 Bukkit 核心配置文件 而不用重启服务器! | 10. 注意:部分选项或设置默认不会重载,若你确信这里有问题,请马上联系作者! | 10. Paper 或者 Spigot 核心的配置文件默认不会重载,你需要输入 /paper reload 或 /spigot reload 命令来重载它们。 | 10. 请注意,这个功能现在只支持 1.8-1.16! | 11. 自动更新。当服务器启动时,如果有更新可用,插件便会自动下载资源并安装到本地。 | 11. 这个功能默认是关闭的,但你也可以在配置文件中开启这个功能。 | 12. 本插件也可监听其他插件的变化!本插件提供一个事件 API 使得插件可以提醒哪一个组件被载入、启用、禁用或是被卸载 | 12. ——每一个都分载入前与载入后阶段。 | 12. 与此同时你也可以参阅 Bukkit 和 Bungee 事件页面!
等等,这些阶段名词都是什么意思?
完全载入插件(像是将服务器启动时载入插件那样) 1. 首先,插件从 plugins 目录中的 .jar 文件中被载入。这被称为 插件载入,这个状态下的插件在 /plugins 命令显示的列表中仍然会是红色,因为插件还没有启用,仅是载入成功而已。 2. 然后,插件就会像一坨噬菌体侵蚀大肠杆菌那样把它的代码都yue进后台里[原文确实是这个风格]将它正确载入所必要的步骤都一一执行,例如数据库连接的建立等(这些内容会被开发者通过开服提示来告诉你插件是否正确运转)——然后,它就可以正常工作了。 完全卸载插件(像是在服务器关闭时禁用并卸载插件那样) 1. 首先,插件被禁用。它会像一个被抗体干掉的病菌那样,失去它的所有功能——例如注册的命令,事件监听器等。但是它还在内存里活着!——同时在这种状态下,/plugins 命令下的插件名称会变红。 2. 然后,插件就会被无情地从内存里卸载掉,于是它就会从 /plugins 命令显示的列表中被除名——也就是完全卸载。 |
请注意,不是所有插件都适用热重载/热加载!一些被重载的前置前置插件可能会报错。不正确的服务器启动或关闭都会导致插件的重载/卸载失效。请万分小心!
谁在使用?
![]()
插件截图
![]() 帮助页面的样式。
![]() 从插件目录载入插件的示例图片。
![]() 重载其他插件的配置文件示例图片。
![]() 重载其他插件的配置文件示例图片,但是有报错。
![]() 使用 /plugins -v 命令显示的内容。
![]() 载入插件的详细信息预览。
![]() 载入插件的命令信息的详细预览。
命令与权限
BungeeCord 核心的插件命令是 /bsu,插件列表的命令是 /bpl Velocity 核心的插件命令是 /vsu,插件列表的命令是 /vpl 命令可在配置文件 commands.yml 中修改。
| /su - 显示帮助命令界面 (serverutils.help) | /su help - 显示帮助命令界面 (serverutils.help) | /su reload - 重载本插件 (serverutils.reload) | /su restart - 通过完全卸载和载入插件本身来重载本插件 (serverutils.restart) | /su reloadconfig - 重载服务器特定插件的配置文件,仅适用于 1.8-1.16 的版本。 | /su loadplugin 插件名称 - 载入插件。(serverutils.loadplugin) | /su unloadplugin 插件名称 - 卸载插件。(serverutils.unloadplugin) | /su enableplugin 插件名称 - 载入插件。(serverutils.enableplugin) | /su disableplugin 插件名称 - 禁用插件。(serverutils.disableplugin) | /su plugininfo 插件名称 - 浏览插件基本信息。(serverutils.plugininfo) | /su commandinfo 命令名称 - 浏览命令所属插件及其基本信息。 (serverutils.commandinfo) | /su reloadplugin 插件名称 - 重载特定插件。(serverutils.relaodplugin) | /su watchplugin 插件名称 - 监视插件文件变动。(serverutils.watchplugin) | /su unwatchplugin 插件名称 - 取消监视插件文件变动。(serverutils.watchplugin) | /pl - 显示插件列表。(serverutils.plugins) | /pl -v - 显示带版本的插件列表。(serverutils.plugins.version) | | 更新提醒权限:serverutils.notification.update
默认配置 这里展示的是 Bukkit 版本的配置文件,其他版本的大同小异。 注意:这里展示的文档不会进行任何翻译。
config.yml YAML config-version: 1 settings: disable-plugins-command: false check-updates-boot: true check-updates-login: false download-updates-boot: false download-updates-login: false install-updates-boot: false install-updates-login: false[/COLOR] disabled-commands: [] unload-after-startup: delay-ticks: 20 plugins: [] hi de-plugins-from-plugins-command: [] protected-plugins: []
lang.yml
(5.73 KB, 下载次数: 4)
messages.yml YAML config-version: 1 messages: generic: prefix: <aqua><bold>ServerUtils <dark_gray><bold>»<reset> <gray> error: <red>An error occurred, please check the console! not-exists: <red>Plugin <dark_red><plugin></dark_red> does not exist! not-enabled: <red>Plugin <dark_red><plugin></dark_red> is not enabled! already-loaded: <red>Plugin <dark_red><plugin></dark_red> is already loaded! already-enabled: <red>Plugin <dark_red><plugin></dark_red> is already enabled! already-disabled: <red>Plugin <dark_red><plugin></dark_red> is already disabled! invalid-plugin: <red>Plugin <dark_red><plugin></dark_red> is invalid! invalid-description: <red>Plugin <dark_red><plugin></dark_red> has an invalid plugin description! unknown-dependency: '<red>Plugin <dark_red><plugin></dark_red> has an unknown dependency: <dark_red><dependency><red>!' file-deleted: <red>File of plugin <dark_red><plugin></dark_red> has been deleted! protected-plugin: <red>Plugin <dark_red><plugin></dark_red> is protected! reload: <dark_aqua>Successfully reloaded <aqua>ServerUtils configurations</aqua>! serverutils-updater: <dark_aqua>Loaded and enabled ServerUtilsUpdater. Completion can be monitored from the console, attempting restart now... loadplugin: <dark_aqua>Successfully loaded <aqua><plugin></aqua>! unloadplugin: <dark_aqua>Successfully unloaded <aqua><plugin></aqua>! reloadplugin: success: <dark_aqua>Successfully reloaded <aqua><plugin></aqua>! serverutils: <red>Sorry, but you can't reload ServerUtils this way. Please restart using <dark_red>/<command></dark_red>. depending-plugins: prefix: '<red>Plugin <dark_red><plugin></dark_red> has depending plugins: ' format: <dark_red><plugin> separator: '<red>, ' last-separator: ' <red>and ' override: <red>Use "<dark_red>/<command></dark_red>" to force command execution. watchplugin: start: <dark_aqua>Started watching <aqua><plugin></aqua>! change: <dark_aqua>Changes detected, reloading plugins now... stopped: <dark_aqua>Stopped watching <aqua><plugin></aqua>! file-deleted: <red>File of plugin <dark_red><plugin></dark_red> has been deleted! Waiting for plugin to show up... deleted-file-is-created: <dark_aqua>File of plugin <aqua><plugin></aqua> has shown up again! already-watching: <red>You are already watching <dark_red><plugin></dark_red>! not-watching: <red>You are not watching <dark_red><plugin></dark_red>! update: available: |- <dark_gray><strikethrough>------------=<reset><dark_gray>[ <aqua><bold>ServerUtils Update<reset> <dark_gray>]<strikethrough>=-------------- <dark_aqua>Current version: <aqua><old> <dark_aqua>New version: <aqua><new> <dark_aqua>Release info: <aqua><info> <dark_gray><strikethrough>------------------------------------------------- downloading: |- <dark_gray><strikethrough>------------=<reset><dark_gray>[ <aqua><bold>ServerUtils Update<reset> <dark_gray>]<strikethrough>=-------------- <dark_aqua>A new version of ServerUtils will be downloaded and installed after a restart! <dark_aqua>Current version: <aqua><old> <dark_aqua>New version: <aqua><new> <dark_aqua>Release info: <aqua><info> <dark_gray><strikethrough>------------------------------------------------- download-failed: <red>Failed to download version <new> of ServerUtils. Please update manually. download-success: <dark_aqua>ServerUtils has been downloaded and will be installed on the next restart. help: header: <dark_gray><strikethrough>-------------=<reset><dark_gray>[ <aqua><bold>ServerUtils Help<reset> <dark_gray>]<strikethrough>=--------------- format: <dark_gray>/<dark_aqua><command> <dark_gray>(<aqua><help><dark_gray>) footer: <dark_gray><strikethrough>------------------------------------------------- plugins: header: <dark_gray><strikethrough>------------=<reset><dark_gray>[ <aqua><bold>ServerUtils Plugins<reset> <dark_gray>]<strikethrough>=------------- prefix: ' <dark_aqua>Plugins <dark_gray>(<green><count><dark_gray>)<aqua>: ' format: <dark_aqua><plugin> format-disabled: <red><plugin> separator: '<aqua>, ' last-separator: ' <aqua>and ' version: ' <dark_gray>(<green><version><dark_gray>)' footer: <dark_gray><strikethrough>------------------------------------------------- plugininfo: header: <dark_gray><strikethrough>-----------=<reset><dark_gray>[ <aqua><bold>ServerUtils PluginInfo<reset> <dark_gray>]<strikethrough>=----------- format: ' <dark_aqua><key><dark_gray>: <aqua><value>' list-format: <aqua><value> list-separator: '<dark_gray>, ' list-last-separator: ' <dark_gray>and ' footer: <dark_gray><strikethrough>------------------------------------------------- commandinfo: header: <dark_gray><strikethrough>-----------=<reset><dark_gray>[ <aqua><bold>ServerUtils CommandInfo<reset> <dark_gray>]<strikethrough>=---------- format: ' <dark_aqua><key><dark_gray>: <aqua><value>' list-format: <aqua><value> list-separator: '<dark_gray>, ' list-last-separator: ' <dark_gray>and ' footer: <dark_gray><strikethrough>------------------------------------------------- not-exists: <red>That command is not a valid registered command. reloadconfig: success: <dark_aqua>Successfully reloaded <aqua><config></aqua>! warnings: <red>There were warnings while reloading <dark_red><config></dark_red>, please check the console! not-exists: <red>Config <dark_red><config></dark_red> does not exist. not-supported: <red>Config <dark_red><config></dark_red> is not supported on your Minecraft version. disableplugin: <dark_aqua>Successfully disabled <aqua><plugin></aqua>! enableplugin: <dark_aqua>Successfully enabled <aqua><plugin></aqua> commands.yml YAML config-version: 1 commands: plugins: main: '%prefix%plugins' aliases: - '%prefix%pl' permission: serverutils.plugins description: Displays the enabled plugins. display-in-help: true flags: version: main: version aliases: - v permission: serverutils.plugins.version description: Displays the plugin versions. display-in-help: true serverutils: main: '%prefix%serverutils' aliases: - '%prefix%su' permission: serverutils.help display-in-help: false subcommands: help: main: help aliases: [] permission: serverutils.help description: Displays the help page. display-in-help: true reload: main: reload aliases: [] permission: serverutils.reload description: Reloads the ServerUtils plugin. display-in-help: true restart: main: restart aliases: [] permission: serverutils.restart description: Restart the ServerUtils plugin. display-in-help: true flags: force: main: force aliases: - f permission: serverutils.restart description: Force restart of the ServerUtils plugin. display-in-help: false loadplugin: main: loadplugin aliases: - lp permission: serverutils.loadplugin description: Loads the specified jar file(s). display-in-help: true unloadplugin: main: unloadplugin aliases: - up permission: serverutils.unloadplugin description: Disables and unloads the specified plugin(s). display-in-help: true flags: force: main: force aliases: - f permission: serverutils.unloadplugin description: Force disable and unload the specified plugin(s). display-in-help: false reloadplugin: main: reloadplugin aliases: - rp permission: serverutils.reloadplugin description: Reloads the specified plugin(s). display-in-help: true flags: force: main: force aliases: - f permission: serverutils.reloadplugin description: Force reloads the specified plugin(s). display-in-help: false watchplugin: main: watchplugin aliases: - wp permission: serverutils.watchplugin description: Watches the specified plugin(s) for changes. display-in-help: true flags: force: main: force aliases: - f permission: serverutils.watchplugin description: Force watches the specified plugin(s) for changes. display-in-help: false unwatchplugin: main: unwatchplugin aliases: - uwp permission: serverutils.watchplugin description: Stops watching the specified plugin for changes. display-in-help: true plugininfo: main: plugininfo aliases: - pi permission: serverutils.plugininfo description: Shows information about the specified plugin. display-in-help: true commandinfo: main: commandinfo aliases: - ci permission: serverutils.commandinfo description: Shows information about the specified command. display-in-help: true enableplugin: main: enableplugin aliases: - ep permission: serverutils.enableplugin description: Enables the specified plugin(s). display-in-help: true disableplugin: main: disableplugin aliases: - dp permission: serverutils.disableplugin description: Disables the specified plugin(s). display-in-help: true flags: force: main: force aliases: - f permission: serverutils.disableplugin description: Force disables the specified plugin(s). display-in-help: false reloadconfig: main: reloadconfig aliases: - rc permission: serverutils.reloadconfig description: Reloads particular server configurations. 联系我们
本插件的 Discord 群组服:https://discord.gg/WJGvzue 与作者发起对话(SpigotMC):https://www.spigotmc.org/conversations/add?to=FrankHeijden 本插件的 Github 开源链接:https://github.com/FrankHeijden/ServerUtils 本插件的讨论页(SpigotMC):https://www.spigotmc.org/threads/442838/
|