Command Controls
完全掌控玩家可见和可使用的命令!
Command Controls 是一款强大的服务器管理模组,允许你根据玩家等级配置命令访问权限——并支持无缝的 LuckPerms 集成。

✨ 特性
? 完整的命令控制
- 从标签补全中隐藏命令 - 玩家只能看到他们被允许使用的命令
- 阻止执行未授权的命令
- 基于等级的权限 - 为不同的玩家组配置不同的命令
? LuckPerms 集成
- 自动检测来自 LuckPerms 的玩家组
- 当玩家等级更改时,命令同步即时生效
- 一键设置命令:
/commandcontrols luckperms-setup
? 模组兼容性
- 同时适用于 原版命令 和 模组命令
- 兼容使用标准 Minecraft 权限检查 (
hasPermissionLevel) 的模组
- 示例:Create、WorldEdit、Carpet Mod、Essential Commands 等
- 对 Xaero's Minimap、Litematica 等模组提供客户端侧过滤
⚠️ 注意: 拥有自己权限系统的模组(如 Impactor)需要在 LuckPerms 中直接设置权限,而不是通过本模组设置。
? 安装
服务端(必需)
- 安装 Fabric Loader 和 Fabric API
- 将模组 JAR 文件放入
mods 文件夹
- (推荐)安装 LuckPerms 以启用基于等级的权限
客户端(可选)
在客户端安装也可以隐藏客户端侧的模组命令。
⚙️ 配置
编辑 config/commandcontrols/commands.json:
{
"rank_hierarchy": ["default", "premium", "vip", "vip+", "moderator", "admin", "owner"],
"bypass_commands": ["help"],
"commands": {
"all_ranks": ["help", "msg", "me", "seed", "list"],
"vip": ["nick", "hat", "fly"],
"moderator": ["kick", "tp", "teleport", "clear", "spectate"],
"admin": ["ban", "give", "gamemode", "time", "weather", "effect", "summon"],
"owner": ["stop", "op", "deop", "whitelist", "luckperms", "reload"]
}
}
工作原理:
rank_hierarchy - 从低到高的等级列表(高等级继承低等级的命令)
all_ranks - 所有人都可以使用的命令
[rank] - 该特定等级及以上可用的命令
? LuckPerms 设置
自动(推荐)
以 OP 身份运行:
/commandcontrols luckperms-setup
这将自动为你的所有等级配置 LuckPerms!
备用方案(无 LuckPerms)
如果没有安装 LuckPerms,模组将使用原版 OP 等级:
- OP 4 → owner
- OP 3 → admin
- OP 2 → moderator
- 其他所有人 → default
? 命令
| 命令 |
描述 |
/commandcontrols |
OP 等级 4 |
/commandcontrols reload |
重新加载配置 |
/commandcontrols luckperms-setup |
自动设置 LuckPerms |
/commandcontrols status |
显示你当前的等级和允许的命令 |
/commandcontrols resync |
同步你的等级权限 |
所有命令都需要 OP 等级 4
? 技术细节
- 通过反射覆盖命令权限(类似于 Player Roles)
- 拦截命令树数据包以实现可见性过滤
- 跟踪命令执行上下文以进行权限检查
- 监听 LuckPerms 事件,在等级更改时即时同步
? 要求
可选
❓ 常见问题
问:这能用于模组命令吗?
答:可以,对于使用 Minecraft 标准 hasPermissionLevel() 检查的模组(大多数模组)。拥有自定义权限系统的模组(如 Impactor,它使用 Cloud Commands)需要在 LuckPerms 中直接设置其权限。
问:玩家需要安装此模组吗?
答:不需要,仅服务端即可正常工作。但在客户端安装也可以隐藏客户端侧的模组命令。
问:命令可见但无法执行?
答:请确保该命令在你的配置文件中,并且玩家拥有正确的 LuckPerms 组。
Command Controls
Take full control over which commands your players can see and use!
Command Controls is a powerful server management mod that lets you configure command access based on player ranks - with seamless LuckPerms integration.

✨ Features
? Complete Command Control
- Hide commands from tab-complete - players only see what they're allowed to use
- Block execution of unauthorized commands
- Rank-based permissions - configure different commands for different player groups
? LuckPerms Integration
- Automatically detects player groups from LuckPerms
- Commands resync instantly when a player's rank changes
- One-click setup command:
/commandcontrols luckperms-setup
? Mod Compatibility
- Works with vanilla commands AND mod commands
- Compatible with mods using standard Minecraft permission checks (
hasPermissionLevel)
- Examples: Create, WorldEdit, Carpet Mod, Essential Commands, etc.
- Client-side filtering for mods like Xaero's Minimap, Litematica, etc.
⚠️ Note: Mods with their own permission systems (like Impactor) need permissions set directly in LuckPerms, not through this mod.
? Installation
Server (Required)
- Install Fabric Loader and Fabric API
- Drop the mod JAR into your
mods folder
- (Recommended) Install LuckPerms for rank-based permissions
Client (Optional)
Install on clients to also hide client-side mod commands.
⚙️ Configuration
Edit config/commandcontrols/commands.json:
{
"rank_hierarchy": ["default", "premium", "vip", "vip+", "moderator", "admin", "owner"],
"bypass_commands": ["help"],
"commands": {
"all_ranks": ["help", "msg", "me", "seed", "list"],
"vip": ["nick", "hat", "fly"],
"moderator": ["kick", "tp", "teleport", "clear", "spectate"],
"admin": ["ban", "give", "gamemode", "time", "weather", "effect", "summon"],
"owner": ["stop", "op", "deop", "whitelist", "luckperms", "reload"]
}
}
How it works:
rank_hierarchy - Ranks from lowest to highest (higher ranks inherit lower rank commands)
all_ranks - Commands everyone can use
[rank] - Commands for that specific rank and above
? LuckPerms Setup
Automatic (Recommended)
Just run as OP:
/commandcontrols luckperms-setup
This automatically configures LuckPerms for all your ranks!
Fallback (No LuckPerms)
Without LuckPerms, the mod uses vanilla OP levels:
- OP 4 → owner
- OP 3 → admin
- OP 2 → moderator
- Everyone else → default
? Commands
| Command |
Description |
/commandcontrols |
OP Level 4 |
/commandcontrols reload |
Reload configuration |
/commandcontrols luckperms-setup |
Auto-setup LuckPerms |
/commandcontrols status |
Show your current rank and allowed commands |
/commandcontrols resync |
Synchronizes your rank permissions |
All commands require OP level 4
? Technical Details
- Overrides command permissions via reflection (similar to Player Roles)
- Intercepts command tree packets for visibility filtering
- Tracks command execution context for permission checks
- Listens to LuckPerms events for instant resync on rank changes
? Requirements
Optional
❓ FAQ
Q: Does this work with mod commands?
A: Yes, for mods that use Minecraft's standard hasPermissionLevel() check (most mods). Mods with custom permission systems (like Impactor, which uses Cloud Commands) need their permissions set directly in LuckPerms.
Q: Do players need the mod installed?
A: No, server-only works fine. But installing on clients hides client-side mod commands too.
Q: Commands are visible but won't execute?
A: Make sure the command is in your config file and the player has the correct LuckPerms group.
评论 0
登录后参与评分
还没有评论,来抢沙发吧