SupportPac
?? Русская версия (Russian Version)
一款轻量且灵活的 Minecraft 插件,适用于 Paper (1.21+),允许服务器工作人员(助手、管理员、管理员)开启或关闭自己的支持状态。该插件与 LuckPerms 直接集成,以动态切换玩家组别。
功能特性
- 切换支持模式:通过单一命令轻松在活跃支持角色(例如
helperon)和非活跃角色(例如 helperoff)之间切换。
- LuckPerms 集成:插件使用 LuckPerms 命令即时更新玩家组别。
- 基于权限控制:完全依赖权限来确定玩家可以切换哪些组别,无需在配置文件中硬编码玩家名称。
- 多语言支持:内置本地化支持(
en, ru, uk, be)。
- 玩家检查:包含快速
/sp check 命令以查看详细的玩家信息。
前置要求
- 服务端软件:Paper 1.21+(或其分支版本)。
- 必需插件:LuckPerms(用于组别管理)。
命令
/sp on [group] - 为特定组别启用支持模式。如果省略 [group],插件将根据你的权限自动检测第一个可用的组别。
/sp off [group] - 为特定组别禁用支持模式。
/sp help - 显示帮助消息。
/sp check <player> - 查看玩家的详细信息(UUID、IP、世界、坐标、生命值、游戏模式)。
/sp reload - 重新加载插件的配置和消息文件。
权限
supportpac.use - 使用基础 /sp 命令所需的权限。
supportpac.check - 允许使用 /sp check。
supportpac.reload - 允许使用 /sp reload 重新加载插件。
sp.<group>.on - 允许玩家切换到特定 <group> 的 on 状态。
sp.<group>.off - 允许玩家切换到特定 <group> 的 off 状态。
示例:若要允许玩家完全使用 helper 组别的切换功能,请授予他们 supportpac.use、sp.helper.on 和 sp.helper.off 权限。
配置文件 (config.yml)
配置文件非常简单。你只需要定义语言,并将插件内的组别映射到实际的 LuckPerms 组别。
language: en # 可用选项:en, ru, uk, be
groups:
helper: # 权限中使用的内部组别名称 (sp.helper.on)
on: helperon # 使用 /sp on 时分配的 LuckPerms 组别
off: helperoff # 使用 /sp off 时分配的 LuckPerms 组别
moder:
on: moderon
off: moderoff
关于 YAML 格式的重要说明
在 YAML 中,键 on 和 off 会被解析为布尔值(true 和 false)。插件会在内部自动处理此问题,因此你可以像上面所示安全地在配置中使用 on: 和 off:。
设置指南
- 将
SupportPac.jar 放入你的 plugins 文件夹中。
- 重启服务器。
- 在
config.yml 中配置你的组别。
- 确保在 LuckPerms 中创建了相应的组别(例如
helperon、helperoff)。
- 授予工作人员必要的权限(例如
/lp group helper permission set sp.helper.on true)。
- 重新加载插件(
/sp reload)或重启服务器。
从源代码构建
要自行构建项目,你需要 Java 21 和 Maven。在项目根目录下运行以下命令:
mvn clean package
编译后的 JAR 文件将位于 target/ 目录中。
SupportPac
?? Русская версия (Russian Version)
A lightweight and flexible Minecraft plugin for Paper (1.21+) that allows server staff (helpers, moderators, admins) to toggle their support status on and off. The plugin integrates directly with LuckPerms to switch player groups dynamically.
Features
- Toggle Support Mode: Easily switch between an active support role (e.g.,
helperon) and an inactive role (e.g., helperoff) with a single command.
- LuckPerms Integration: The plugin uses LuckPerms commands to instantly update player groups.
- Permission-Based: Fully relies on permissions to determine which groups a player can toggle, eliminating the need for hardcoded player names in the config.
- Multi-language Support: Built-in localization support (
en, ru, uk, be).
- Player Inspection: Includes a quick
/sp check command to view detailed player information.
Prerequisites
- Server software: Paper 1.21+ (or forks).
- Required plugin: LuckPerms (for group management).
Commands
/sp on [group] - Enable support mode for a specific group. If [group] is omitted, the plugin will auto-detect the first available group based on your permissions.
/sp off [group] - Disable support mode for a specific group.
/sp help - Show the help message.
/sp check <player> - View detailed information about a player (UUID, IP, World, Coordinates, Health, Gamemode).
/sp reload - Reload the plugin's configuration and messages.
Permissions
supportpac.use - Required to use the base /sp command.
supportpac.check - Allows the use of /sp check.
supportpac.reload - Allows reloading the plugin with /sp reload.
sp.<group>.on - Allows a player to switch to the on state for a specific <group>.
sp.<group>.off - Allows a player to switch to the off state for a specific <group>.
Example: To allow a player to fully use the helper group toggle, grant them supportpac.use, sp.helper.on, and sp.helper.off.
Configuration (config.yml)
The configuration file is extremely simple. You only need to define your language and map your plugin groups to your actual LuckPerms groups.
language: en # Available options: en, ru, uk, be
groups:
helper: # The internal name of the group used in permissions (sp.helper.on)
on: helperon # The LuckPerms group assigned when using /sp on
off: helperoff # The LuckPerms group assigned when using /sp off
moder:
on: moderon
off: moderoff
Important Note on YAML formatting
In YAML, the keys on and off are parsed as boolean values (true and false). The plugin automatically handles this internally, so you can safely use on: and off: in your configuration as shown above.
Setup Guide
- Drop the
SupportPac.jar into your plugins folder.
- Restart the server.
- Configure your groups in
config.yml.
- Ensure you have the corresponding groups created in LuckPerms (e.g.,
helperon, helperoff).
- Grant your staff the necessary permissions (e.g.,
/lp group helper permission set sp.helper.on true).
- Reload the plugin (
/sp reload) or restart the server.
Building from source
To build the project yourself, you need Java 21 and Maven. Run the following command in the project root:
mvn clean package
The compiled JAR will be located in the target/ directory.
评论 0
登录后参与评分
还没有评论,来抢沙发吧