PluginControl
描述
此插件允许你控制哪些模组必须在服务器继续运行之前启用。
灵感来自 这里
和 这里 的评论,以及我自己遇到的相同问题。
安装
- 下载 PluginControl 插件。
- 将下载的插件文件放入服务器的
plugins 文件夹中。
- 重启服务器以加载 PluginControl 插件。
- 使用命令
/plugincontrol add <plugin-name> 将插件添加到列表中。
- 使用命令
/plugincontrol action <action-type> 设置如果列出的任何插件未启用时采取的操作。有关可用操作,请参阅 Actions 部分。
- 通过运行命令
/plugincontrol enable 启用 PluginControl 插件。
- 使用命令
/plugincontrol reload 重新加载 PluginControl 插件的配置和语言文件。
请注意,<action-type> 和 <plugin-name> 占位符应根据需要替换为具体的操作和插件名称。
注意:此插件需要 Java 17 才能工作。
配置
| 选项 |
描述 |
enabled |
是否启用该插件。 |
action |
如果所有列出的插件均未启用时采取的操作。 |
kick-message |
当启用 disallow-player-login 操作时发送给玩家的消息。 |
plugins |
服务器启动时需要启用的插件列表。 |
Actions
| Action Type |
Description |
log-to-console |
在控制台中发送警告(lang.yaml 中的 log-to-console)。 |
disallow-player-login |
阻止玩家进入服务器并显示消息(config.yml 中的 kick-message)。 |
shutdown-server |
关闭服务器并显示警告(lang.yml 中的 disabling-server)。 |
Kick Message
允许你在启用 disallow-player-login 操作时自定义发送给玩家的消息。
可以使用 &#<hex> 代码或旧版颜色代码进行自定义(不支持 MiniMessage)。
Default config.yml
update-notifier: false
enabled: false
# Action to take if all listed plugins are not enabled.
# log-to-console
# disallow-player-login
# shutdown-server
action: log-to-console
plugins: [ ]
groups: { }
Messages
使用 MiniMessage 更改消息格式。
Placeholders
| Placeholder |
Usage |
<prefix> |
所有消息都接受此占位符 |
<action> |
command.action-type |
<actions> |
command.action-list |
<command> |
command.command-not-found, command.plugin-add-error 和 command.plugin-remove-error |
<kick-message> |
command.kick-message 和 command.kick-message-set |
<plugin> |
command.plugin-added, command.plugin-not-found 和 command.plugin-removed |
<plugins> |
console.disabling-server 和 command.plugin-list |
Default lang.yml
prefix: '<dark_gray>[<red>PluginControl<dark_gray>]'
kick-message: '<red>[PluginControl] 您不被允许加入服务器!'
console:
checking-plugins: '<prefix> <red>正在检查插件...'
disabling-server: '<prefix> <red>由于未找到或启用所需的插件或组,正在禁用服务器!'
finished-checking: '<prefix> <green>插件验证完成!'
log-to-console-plugin: '<prefix> <red>未找到所需插件: <plugins>'
log-to-console-group: '<prefix> <red>未找到所需组: <groups>'
plugin-disabled: '<prefix> <red>Plugin Control 已禁用!'
command:
action-list: '<prefix> <green>可用操作: <yellow><actions>'
action-set: '<prefix> <green>操作已设置为 <yellow><action>'
action-type: '<prefix> <green>操作类型: <yellow><action>'
checking-plugins: '<prefix> <green>正在检查插件... 更多信息请查看控制台。'
check-depend-error: '<red>用法: <yellow>/<command> check-depend <green><plugin-name>'
check-depend-not-found: '<prefix> <red>没有插件依赖或软依赖 <plugin>!'
check-depend-depend: '<prefix> <yellow>依赖 <green><plugin> 的插件: <red><plugins>'
check-depend-softdepend: '<prefix> <yellow>软依赖 <green><plugin> 的插件: <red><plugins>'
command-not-found: '<red>用法: <yellow>/<command> help <red>以查看所有可用命令'
kick-message: '<prefix> <green>踢出消息: <yellow><kick-message>'
kick-message-set: '<prefix> <green>踢出消息已设置为 <yellow><kick-message>'
plugin-add-error: '<red>用法: <yellow>/<command> add <all|plugin-name>'
plugin-added: '<prefix> <green>插件 <yellow><plugin> <green>已添加!'
plugin-added-all: '<prefix> <green>所有插件已添加到所需插件列表!'
plugin-already-added: '<prefix> <red>插件已添加!'
plugin-disabled: '<prefix> <red>正在停用插件功能...'
plugin-enabled: '<prefix> <green>正在激活插件功能...'
plugin-list: '<prefix> <yellow>所需插件: <plugins>'
plugin-list-separator: '<gray>, '
plugin-list-separator-last: '<gray> 和 '
plugin-list-enabled-color: '<green>'
plugin-list-disabled-color: '<red>'
plugin-list-empty: '<prefix> <red>未添加任何插件!'
plugin-not-found: '<prefix> <red>插件 <yellow><plugin> <red>未在列表中找到!'
plugin-reload: '<prefix> <green>配置和语言文件已重新加载!'
plugin-remove-error: '<red>用法: <yellow>/<command> remove <all|plugin-name>'
plugin-removed: '<prefix> <green>插件 <yellow><plugin> <green>已移除!'
plugin-removed-all: '<prefix> <green>所有插件已移除!'
plugin-click-remove: '<red>点击以移除该插件'
group-create-error: '<red>用法: <yellow>/<command> group create <group-name>'
group-created: '<prefix> <green>组 <yellow><group> <green>已创建!'
group-already-exist: '<prefix> <red>组已存在!'
group-remove-error: '<red>用法: <yellow>/<command> group delete <group-name>'
group-removed: '<prefix> <green>组 <yellow><group> <green>已移除!'
group-not-found: '<prefix> <red>组 <yellow><group> <red>未找到!'
group-list-empty: '<prefix> <red>未添加任何组!'
group-list: '<prefix> <yellow>所需组: <groups>'
group-list-error: '<red>用法: <yellow>/<command> group list <group-name>'
plugin-added-to-group: '<prefix> <green>插件 <yellow><plugin> <green>已添加到组 <yellow><group>'
plugin-add-to-group-error: '<red>用法: <yellow>/<command> group add <group-name> <plugin-name>'
plugin-removed-from-group: '<prefix> <green>插件 <yellow><plugin> <green>已从组 <yellow><group> 中移除'
plugin-removed-from-group-error: '<red>用法: <yellow>/<command> group remove <group-name> <plugin-name>'
plugin-not-in-group: '<prefix> <red>插件 <yellow><plugin> <red>不在组 <yellow><group> 中'
group-plugin-list-error: '<red>用法: <yellow>/<command> group list <group-name>'
group-has-no-plugins: '<prefix> <red>组 <yellow><group> <red>没有任何插件!'
group-plugin-list: '<prefix> <yellow>组 <green><group><yellow> 中的插件: <yellow><plugins>'
group-list-name: '<yellow>组 <group>:'
group-click-delete: '<red>点击以删除该组'
group-click-remove-plugin: '<red>点击以从组中移除该插件'
group-click-info: '<yellow>点击查看组信息'
group-help:
- '<gradient:aqua:green>=== Plugin Control 组帮助 ===</gradient>'
- '<aqua>/<command> group create <green><group> <yellow>- 创建一个组'
- '<aqua>/<command> group delete <green><group> <yellow>- 移除一个组'
- '<aqua>/<command> group list <yellow>- 列出所有所需组'
- '<aqua>/<command> group add <green><group> <plugin> <yellow>- 将一个插件添加到组中'
- '<aqua>/<command> group remove <green><group> <plugin> <yellow>- 从一个组中移除一个插件'
- '<aqua>/<command> group list <green><group> <yellow>- 列出组中的所有插件'
- '<aqua>/<command> group help <yellow>- 显示组帮助'
- '<gradient:aqua:green>================================</gradient>'
help:
- '<gradient:aqua:green>==== Plugin Control 帮助 ====</gradient>'
- '<aqua>/<command> add <green><all|plugin> <yellow>- 将插件添加到列表'
- '<aqua>/<command> remove <green><all|plugin> <yellow>- 从列表中移除一个插件'
- '<aqua>/<command> action <yellow>- 列出所有可用操作'
- '<aqua>/<command> action <green><action-type> <yellow>- 设置操作类型'
- '<aqua>/<command> group create <green><group> <yellow>- 创建一个组'
- '<aqua>/<command> group delete <green><group> <yellow>- 移除一个组'
- '<aqua>/<command> group list <yellow>- 列出所有所需组'
- '<aqua>/<command> group add <green><group> <plugin> <yellow>- 将一个插件添加到组中'
- '<aqua>/<command> group remove <green><group> <plugin> <yellow>- 从一个组中移除一个插件'
- '<aqua>/<command> group list <green><group> <yellow>- 列出组中的所有插件'
<aqua>/<command> group help <yellow>- 显示群组帮助
<aqua>/<command> kick-message <yellow>- 显示踢出消息
<aqua>/<command> kick-message <green><message> <yellow>- 设置踢出消息
<aqua>/<command> enable <yellow>- 启用插件
<aqua>/<command> disable <yellow>- 禁用插件
<aqua>/<command> toggle <yellow>- 启用或禁用插件
<aqua>/<command> list <yellow>- 列出所有必需插件
<aqua>/<command> check <yellow>- 检查必需插件是否已激活
<aqua>/<command> check-depend <green><plugin> <yellow>- 检查哪些插件依赖或软依赖于某插件
<aqua>/<command> reload <yellow>- 重载配置和语言文件
<aqua>/<command> help <yellow>- 显示此帮助信息
<gradient:aqua:green>=========================</gradient>
命令
主命令 /plugincontrol - 别名:/pc 和 /pcontrol
| 命令 |
子命令 |
描述 |
/plugincontrol |
add <插件名称> |
将插件添加到列表中。 |
/plugincontrol |
remove <插件名称> |
从列表中移除插件。 |
| /plugincontrol | action | 检查当前操作。 |
| /plugincontrol | action <action-type> | 设置要采取的操作。 |
| /plugincontrol | kick-message | 查看当前的踢出消息。 |
| /plugincontrol | kick-message <message> | 设置踢出消息。 |
| /plugincontrol | enable \| on | 启用 PluginControl。 |
| /plugincontrol | disable \| off | 禁用 PluginControl。 |
| /plugincontrol | toggle | 开启或关闭 PluginControl。 |
| /plugincontrol | list | 列出列表中的所有插件。 |
| /plugincontrol | check | 检查所需的插件是否已启用。 |
| /plugincontrol | check-depend <plugin> | 检查哪些插件依赖或软依赖于某个插件。 |
| /plugincontrol | reload | 重新加载配置文件和语言文件。 |
| /plugincontrol | help \| ? | 显示命令列表。 |
请注意,<plugin-name>、<action-type> 和 <message> 占位符应根据需要替换为具体的插件名称和踢出消息。
权限
| 权限 |
描述 |
plugincontrol.use |
使用所有 命令 的权限 |
plugincontrol.bypass |
绕过 action 中的 disallow-player-login |
PluginControl
Description
This plugin allows you to control which plugins have to be enabled for the server continues running.
Inspired by this
and this comment and myself having the same
problem.
Installation
- Download the PluginControl plugin.
- Place the downloaded plugin file in the
plugins folder of your server.
- Restart the server to load the PluginControl plugin.
- Add plugins to the list using the command
/plugincontrol add <plugin-name>.
- Use the command
/plugincontrol action <action-type> to set the action to be taken if any of the listed plugins are not enabled. See the Actions section for available actions.
- Enable the PluginControl plugin by running the command
/plugincontrol enable.
- Reload the PluginControl plugin configuration and language files with the command
/plugincontrol reload.
Please note that the <action-type> and <plugin-name> placeholders should be replaced with the specific action and
plugin names as needed.
Note: This plugin needs Java 17 to work.
Configuration
| Option |
Description |
enabled |
Whether the plugin is enabled or not. |
action |
Action to take if all listed plugins are not enabled. |
kick-message |
Message sent to the player when the disallow-player-login action is enabled. |
plugins |
List of plugins to be enabled when the server starts. |
Actions
| Action Type |
Description |
log-to-console |
Sends a warning (log-to-console inside lang.yaml) in the console. |
disallow-player-login |
Block player from enter the server with a message (kick-message inside config.yml). |
shutdown-server |
Shutdown the server with a warning (disabling-server inside lang.yml). |
Kick Message
Allows you to customize the message sent to the player when the disallow-player-login action is enabled.
Can be customized using &#<hex> code or legacy color codes (no MiniMessage support).
Default config.yml
update-notifier: false
enabled: false
# Action to take if all listed plugins are not enabled.
# log-to-console
# disallow-player-login
# shutdown-server
action: log-to-console
plugins: [ ]
groups: { }
Messages
Change the message formatting using MiniMessage
Placeholders
| Placeholder |
Usage |
<prefix> |
All messages accept this placeholder |
<action> |
command.action-type |
<actions> |
command.action-list |
<command> |
command.command-not-found, command.plugin-add-error and command.plugin-remove-error |
<kick-message> |
command.kick-message and command.kick-message-set |
<plugin> |
command.plugin-added, command.plugin-not-found and command.plugin-removed |
<plugins> |
console.disabling-server and command.plugin-list |
Default lang.yml
prefix: '<dark_gray>[<red>PluginControl<dark_gray>]'
kick-message: '<red>[PluginControl] You are not allowed to join the server!'
console:
checking-plugins: '<prefix> <red>Checking plugins...'
disabling-server: '<prefix> <red>Disabling server because plugins or groups were not found or enabled!'
finished-checking: '<prefix> <green>Plugins verified!'
log-to-console-plugin: '<prefix> <red>Required plugins were not found: <plugins>'
log-to-console-group: '<prefix> <red>Required groups were not found: <groups>'
plugin-disabled: '<prefix> <red>Plugin Control is disabled!'
command:
action-list: '<prefix> <green>Actions available: <yellow><actions>'
action-set: '<prefix> <green>Action set to <yellow><action>'
action-type: '<prefix> <green>Action type: <yellow><action>'
checking-plugins: '<prefix> <green>Checking plugins... See the console for more information.'
check-depend-error: '<red>Usage: <yellow>/<command> check-depend <green><plugin-name>'
check-depend-not-found: '<prefix> <red>No plugins depend or softdepend on <plugin>!'
check-depend-depend: '<prefix> <yellow>Plugins that depend on <green><plugin>: <red><plugins>'
check-depend-softdepend: '<prefix> <yellow>Plugins that softdepend on <green><plugin>: <red><plugins>'
command-not-found: '<red>Usage: <yellow>/<command> help <red>to see the available commands'
kick-message: '<prefix> <green>Kick message: <yellow><kick-message>'
kick-message-set: '<prefix> <green>Kick message set to <yellow><kick-message>'
plugin-add-error: '<red>Usage: <yellow>/<command> add <all|plugin-name>'
plugin-added: '<prefix> <green>Plugin <yellow><plugin> <green>added!'
plugin-added-all: '<prefix> <green>All plugins added to the list of required plugins!'
plugin-already-added: '<prefix> <red>Plugin already added!'
plugin-disabled: '<prefix> <red>Deactivating plugin features...'
plugin-enabled: '<prefix> <green>Activating plugin features...'
plugin-list: '<prefix> <yellow>Required Plugins: <plugins>'
plugin-list-separator: '<gray>, '
plugin-list-separator-last: '<gray> and '
plugin-list-enabled-color: '<green>'
plugin-list-disabled-color: '<red>'
plugin-list-empty: '<prefix> <red>No plugins added!'
plugin-not-found: '<prefix> <red>Plugin <yellow><plugin> <red>not found in the list!'
plugin-reload: '<prefix> <green>Config and Language reloaded!'
plugin-remove-error: '<red>Usage: <yellow>/<command> remove <all|plugin-name>'
plugin-removed: '<prefix> <green>Plugin <yellow><plugin> <green>removed!'
plugin-removed-all: '<prefix> <green>All plugins removed!'
plugin-click-remove: '<red>Click to remove the plugin'
group-create-error: '<red>Usage: <yellow>/<command> group create <group-name>'
group-created: '<prefix> <green>Group <yellow><group> <green>created!'
group-already-exist: '<prefix> <red>Group already exists!'
group-remove-error: '<red>Usage: <yellow>/<command> group delete <group-name>'
group-removed: '<prefix> <green>Group <yellow><group> <green>removed!'
group-not-found: '<prefix> <red>Group <yellow><group> <red>not found!'
group-list-empty: '<prefix> <red>No groups added!'
group-list: '<prefix> <yellow>Required Groups: <groups>'
group-list-error: '<red>Usage: <yellow>/<command> group list <group-name>'
plugin-added-to-group: '<prefix> <green>Plugin <yellow><plugin> <green>added to group <yellow><group>'
plugin-add-to-group-error: '<red>Usage: <yellow>/<command> group add <group-name> <plugin-name>'
plugin-removed-from-group: '<prefix> <green>Plugin <yellow><plugin> <green>removed from group <yellow><group>'
plugin-removed-from-group-error: '<red>Usage: <yellow>/<command> group remove <group-name> <plugin-name>'
plugin-not-in-group: '<prefix> <red>Plugin <yellow><plugin> <red>not in group <yellow><group>'
group-plugin-list-error: '<red>Usage: <yellow>/<command> group list <group-name>'
group-has-no-plugins: '<prefix> <red>Group <yellow><group> <red>has no plugins!'
group-plugin-list: '<prefix> <yellow>Plugins in group <green><group><yellow>: <yellow><plugins>'
group-list-name: '<yellow>Group <group>:'
group-click-delete: '<red>Click to delete the group'
group-click-remove-plugin: '<red>Click to remove the plugin from the group'
group-click-info: '<yellow>Click to see the group info'
group-help:
- '<gradient:aqua:green>=== Plugin Control Group Help ===</gradient>'
- '<aqua>/<command> group create <green><group> <yellow>- Create a group'
- '<aqua>/<command> group delete <green><group> <yellow>- Remove a group'
- '<aqua>/<command> group list <yellow>- List all required groups'
- '<aqua>/<command> group add <green><group> <plugin> <yellow>- Add a plugin into a group'
- '<aqua>/<command> group remove <green><group> <plugin> <yellow>- Remove a plugin from a group'
- '<aqua>/<command> group list <green><group> <yellow>- List all plugins in a group'
- '<aqua>/<command> group help <yellow>- Show the group help'
- '<gradient:aqua:green>================================</gradient>'
help:
- '<gradient:aqua:green>==== Plugin Control Help ====</gradient>'
- '<aqua>/<command> add <green><all|plugin> <yellow>- Add a plugin to the list'
- '<aqua>/<command> remove <green><all|plugin> <yellow>- Remove a plugin from the list'
- '<aqua>/<command> action <yellow>- List all actions available'
- '<aqua>/<command> action <green><action-type> <yellow>- Set an action type'
- '<aqua>/<command> group create <green><group> <yellow>- Create a group'
- '<aqua>/<command> group delete <green><group> <yellow>- Remove a group'
- '<aqua>/<command> group list <yellow>- List all required groups'
- '<aqua>/<command> group add <green><group> <plugin> <yellow>- Add a plugin into a group'
- '<aqua>/<command> group remove <green><group> <plugin> <yellow>- Remove a plugin from a group'
- '<aqua>/<command> group list <green><group> <yellow>- List all plugins in a group'
- '<aqua>/<command> group help <yellow>- Show the group help'
- '<aqua>/<command> kick-message <yellow>- Show the kick message'
- '<aqua>/<command> kick-message <green><message> <yellow>- Set the kick message'
- '<aqua>/<command> enable <yellow>- Enable the plugin'
- '<aqua>/<command> disable <yellow>- Disable the plugin'
- '<aqua>/<command> toggle <yellow>- Enable or disable the plugin'
- '<aqua>/<command> list <yellow>- List all required plugins'
- '<aqua>/<command> check <yellow>- Checks if required plugins are activated'
- '<aqua>/<command> check-depend <green><plugin> <yellow>- Check which plugins depend or softdepend on a plugin'
- '<aqua>/<command> reload <yellow>- Reload the config and language'
- '<aqua>/<command> help <yellow>- Show this help'
- '<gradient:aqua:green>=========================</gradient>'
Commands
Main Command /plugincontrol - Aliases: /pc and /pcontrol
| Command |
Sub Command |
Description |
/plugincontrol |
add <plugin-name> |
Add a plugin to the list. |
/plugincontrol |
remove <plugin-name> |
Remove a plugin from the list. |
/plugincontrol |
action |
Check the current action. |
/plugincontrol |
action <action-type> |
Set the action to take. |
/plugincontrol |
kick-message |
Check the current kick message. |
/plugincontrol |
kick-message <message> |
Set the kick message. |
/plugincontrol |
enable | on |
Enable PluginControl. |
/plugincontrol |
disable | off |
Disable PluginControl. |
/plugincontrol |
toggle |
Toggle PluginControl on or off. |
/plugincontrol |
list |
List all plugins in the list. |
/plugincontrol |
check |
Checks if required plugins are activated. |
/plugincontrol |
check-depend <plugin> |
Check which plugins depend or softdepend on a plugin. |
/plugincontrol |
reload |
Reload the configuration and language files. |
/plugincontrol |
help | ? |
Show the list of commands. |
Please note that the <plugin-name>, <action-type> and <message> placeholders should be replaced with the specific
plugin name and kick message, respectively, as required.
Permissions
| Permissions |
Description |
plugincontrol.use |
Permission to use all commands |
plugincontrol.bypass |
Bypass the disallow-player-login in action |
评论 0
登录后参与评分
还没有评论,来抢沙发吧