CmdRankPlus
CmdRankPlus 是一款适用于 Spigot/Paper Minecraft 的插件,可根据配置文件中定义的权限和等级执行自定义命令。该插件旨在提供灵活且易于配置的体验。
✨ 功能
- 可定制的触发命令:在
config.yml 文件中添加如 /shops 或 /menu 等命令。
- 基于等级的操作:将特定操作与等级关联(例如
/say {player} shop1)。
- 动态占位符:使用
{player} 和 {rank} 来自定义操作内容。
- 重载命令:无需重启服务器即可重新加载配置文件。
- 权限管理:通过 LuckPerms 或其他任何权限管理器控制对功能的访问权限。
? 安装
- 从 Releases 区域下载插件 JAR 文件。
- 将该文件放入 Minecraft 服务器的
plugins 文件夹中。
- 重启服务器以生成
config.yml 文件。
- 在
config.yml 文件中配置命令和等级。
⚙️ 配置 (config.yml)
以下是一个示例配置:
commands:
shops:
rang1: "/shop {player} shop1"
rang2: "/shop {player} shop2"
rang3: "/shop {player} shop3"
menu:
rang1: "/menu {player} menu1"
rang2: "/menu {player} menu2"
rang3: "/menu {player} menu3"
说明:
commands:触发命令列表(例如 /shops、/menu)。
rangX:与每个等级关联的具体操作。
{player}:对应玩家的用户名。
{rank}:对应等级名称。
?️ 命令
主要命令:
| 命令 |
描述 |
/cmdrankplus reload |
重新加载配置(包括等级及其关联的动作)。 |
/cmdrankplus help |
显示关于插件工作原理的详细指南。 |
注意事项:
- ⚠️ 触发重新加载的命令:若要添加诸如
/shops 之类的新命令,必须重启 Minecraft 服务器。
? 权限
主要权限:
| 权限 |
描述 |
cmdrankplus.reload |
允许执行 /cmdrankplus reload 命令。默认情况下 OP(管理员)拥有此权限。 |
基于等级的权限管理:
要将用户与特定等级关联,请通过 LuckPerms 或其他权限管理插件添加类似 cmdrankplus.rangX 的权限。
LuckPerms 示例:
/lp group <group_name> permission set cmdrankplus.rang1 true
? 使用示例
-
拥有 cmdrankplus.rang1 权限的玩家执行 /shops。
- 插件将执行为
rang1 配置的命令,例如 /shop <player> shop1。
-
管理员在修改配置后希望重新加载:
- 他们执行
/cmdrankplus reload。
? 限制
- 新增的触发命令(例如
/shops)需要重启服务器才能被检测到。
- 权限必须在
config.yml 中定义后,才能在 LuckPerms 中用于自动补全。
? 许可证
本项目采用 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。
CmdRankPlus
CmdRankPlus is a Spigot/Paper Minecraft plugin that executes custom commands based on permissions and ranks defined in a configuration file. This plugin is designed to be flexible and easy to configure.
✨ Features
- Customizable trigger commands: Add commands like
/shops or /menu in the config.yml file.
- Rank-based actions: Associate specific actions with ranks (e.g.,
/say {player} shop1).
- Dynamic placeholders: Use
{player} and {rank} to customize actions.
- Reload command: Reload the configuration without restarting the server.
- Permission management: Control access to features via LuckPerms or any other permission manager.
? Installation
- Download the plugin JAR file from the Releases section.
- Place the file in your Minecraft server's
plugins folder.
- Restart your server to generate the
config.yml file.
- Configure commands and ranks in the
config.yml file.
⚙️ Configuration (config.yml)
Here's an example configuration:
commands:
shops:
rang1: "/shop {player} shop1"
rang2: "/shop {player} shop2"
rang3: "/shop {player} shop3"
menu:
rang1: "/menu {player} menu1"
rang2: "/menu {player} menu2"
rang3: "/menu {player} menu3"
Explanations:
commands: List of trigger commands (e.g., /shops, /menu).
rangX: Specific actions associated with each rank.
{player}: Corresponds to the player's username.
{rank}: Corresponds to the rank name.
?️ Commands
Main Commands:
| Command |
Description |
/cmdrankplus reload |
Reloads the configuration (ranks and associated actions). |
/cmdrankplus help |
Displays a detailed guide on how the plugin works. |
Notes:
- ⚠ Reloading trigger commands: To add new commands like
/shops, you must restart the Minecraft server.
? Permissions
Main Permissions:
| Permission |
Description |
cmdrankplus.reload |
Allows execution of the /cmdrankplus reload command. Default for OPs. |
Rank-based permission management:
To associate a user with a rank, add a permission like cmdrankplus.rangX via LuckPerms or another permission manager.
Example with LuckPerms:
/lp group <group_name> permission set cmdrankplus.rang1 true
? Usage Examples
-
A player with the cmdrankplus.rang1 permission executes /shops.
- The plugin executes the command configured for
rang1, for example /shop <player> shop1.
-
An administrator wants to reload the configuration after modification:
- They execute
/cmdrankplus reload.
? Limitations
- New trigger commands (e.g.,
/shops) require a server restart to be detected.
- Permissions must be defined in
config.yml before being used with LuckPerms for auto-completion.
? License
This project is licensed under the MIT License. See the LICENSE file for more information.
评论 0
登录后参与评分
还没有评论,来抢沙发吧