Skip to content

Commit 6426bd0

Browse files
committed
docs: add permissions, reset, unregister, hide, reveal pages
1 parent 7f25480 commit 6426bd0

File tree

7 files changed

+1381
-1
lines changed

7 files changed

+1381
-1
lines changed
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
title: Hiding/Revealing Commands
3+
description: Control command visibility in tab completion and help menus
4+
---
5+
6+
# Hiding and Revealing Commands
7+
8+
Hiding commands allows you to control which commands appear in tab completion and help menus,
9+
creating a cleaner experience for players while still allowing the commands to be executed by those who know them.
10+
11+
## Commands
12+
13+
### Hide a Command
14+
15+
Usage: `/command hide <command>`
16+
Hides a command from tab completion and help menus. Supports wildcards for bulk operations.
17+
18+
**Examples:**
19+
```
20+
<gray># Hide specific commands</gray>
21+
/command hide <aqua>plugins</aqua>
22+
/command hide <aqua>pl</aqua>
23+
24+
<gray># Hide all commands</gray>
25+
/command hide <aqua>*</aqua>
26+
27+
<gray># Hide all bukkit namespaced commands</gray>
28+
/command hide <aqua>bukkit:*</aqua>
29+
30+
<gray># Hide all namespaced commands</gray>
31+
/command hide <aqua>*:*</aqua>
32+
```
33+
34+
### Reveal a Command
35+
Usage: `/command reveal <command>`
36+
Makes a previously hidden command visible again in tab completion and help menus. Supports wildcards for bulk operations.
37+
38+
**Examples:**
39+
```
40+
<gray># Reveal specific commands</gray>
41+
/command reveal <aqua>plugins</aqua>
42+
/command reveal <aqua>pl</aqua>
43+
44+
<gray># Reveal all hidden commands</gray>
45+
/command reveal <aqua>*</aqua>
46+
47+
<gray># Reveal all bukkit namespaced commands</gray>
48+
/command reveal <aqua>bukkit:*</aqua>
49+
50+
<gray># Reveal all namespaced commands</gray>
51+
/command reveal <aqua>*:*</aqua>
52+
```
53+
54+
## Wildcard Support
55+
56+
Commander supports powerful wildcard patterns for bulk command operations:
57+
58+
### Wildcard Patterns
59+
60+
- `*` - Matches any command name
61+
- `:*` - Matches any namespaced command (commands with colons)
62+
- `prefix:*` - Matches all commands with a specific namespace prefix
63+
- `*suffix` - Matches all commands ending with a specific suffix
64+
65+
### Common Wildcard Examples
66+
67+
```
68+
<gray># Hide ALL commands (use with caution!)</gray>
69+
/command hide <aqua>*</aqua>
70+
71+
<gray># Hide all vanilla Minecraft commands</gray>
72+
/command hide <aqua>minecraft:*</aqua>
73+
74+
<gray># Hide all Bukkit/Spigot commands</gray>
75+
/command hide <aqua>bukkit:*</aqua>
76+
77+
<gray># Hide all plugin commands (namespaced)</gray>
78+
/command hide <aqua>*:*</aqua>
79+
80+
<gray># Hide all commands starting with "admin"</gray>
81+
/command hide <aqua>admin*</aqua>
82+
83+
<gray># Hide all commands ending with "list"</gray>
84+
/command hide <aqua>*list</aqua>
85+
```
86+
87+
### Wildcard Use Cases
88+
89+
#### Complete Command Cleanup
90+
```
91+
<gray># Hide all namespaced commands (usually plugin commands)</gray>
92+
/command hide <aqua>*:*</aqua>
93+
94+
<gray># Then selectively reveal essential ones</gray>
95+
/command reveal <aqua>essentials:*</aqua>
96+
/command reveal <aqua>luckperms:*</aqua>
97+
```
98+
99+
#### Plugin Management
100+
```
101+
<gray># Hide all commands from a specific plugin</gray>
102+
/command hide <aqua>worldedit:*</aqua>
103+
104+
<gray># Hide all administrative commands</gray>
105+
/command hide <aqua>admin*</aqua>
106+
/command hide <aqua>*admin</aqua>
107+
```
108+
109+
#### Server Type Filtering
110+
```
111+
<gray># Hide all creative mode commands on a survival server</gray>
112+
/command hide <aqua>fly</aqua>
113+
/command hide <aqua>gamemode</aqua>
114+
/command hide <aqua>worldedit:*</aqua>
115+
```
116+
117+
### Important Notes
118+
119+
⚠️ **Warning:** Using `/command hide *` will hide literally ALL commands, including essential ones like `/command` itself. Make sure you have alternative access to restore commands.
120+
121+
⚠️ **Warning:** Wildcard operations affect many commands at once. Test carefully and consider using `/command save` before bulk operations.
122+
123+
💡 **Tip:** Use `/command reveal *` to quickly restore all hidden commands.
124+
125+
💡 **Tip:** Combine wildcards with specific commands for fine-tuned control.
126+
127+
## Behavior
128+
129+
### Hidden Commands
130+
- Hidden commands are **still executable** by players who know the command
131+
- Hidden commands don't appear in tab completion
132+
- Hidden commands don't appear in help menus (`/help`, `/?`)
133+
- The command configuration is saved to a JSON file
134+
135+
### Bypass Permission
136+
Players with the `commander.bypass` permission can see all hidden commands, regardless of other permissions.
137+
138+
**Important:** Wildcard permissions (like `*`) are ignored for the bypass permission. Players must have the explicit `commander.bypass` permission to see hidden commands.
139+
140+
## Use Cases
141+
142+
### Clean Command Lists
143+
Hide administrative or utility commands that regular players shouldn't see:
144+
```
145+
/command hide <aqua>plugins</aqua>
146+
/command hide <aqua>pl</aqua>
147+
/command hide <aqua>version</aqua>
148+
/command hide <aqua>ver</aqua>
149+
```
150+
151+
### Server-Specific Commands
152+
Hide commands that are only relevant to certain server types or gamemodes.
153+
154+
### Development Commands
155+
Hide debugging or development commands from production environments.
156+
157+
## Configuration
158+
159+
Hidden commands are stored in a JSON configuration file. The file contains a simple array of command names that should be hidden.
160+
161+
`hidden-commands.json`:
162+
```json
163+
[
164+
"plugins",
165+
"pl",
166+
"version",
167+
"ver"
168+
]
169+
```
170+
171+
## Tips
172+
173+
- Commands are hidden without the `/` prefix in the configuration
174+
- Both the full command name and aliases should be hidden if desired
175+
- Use `/command reload` to reload the configuration if manually edited

content/docs/commander/index.mdx

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,106 @@ description: Manage command visibility and permissions
44
icon: BookMarked
55
---
66

7-
Coming soon!
7+
# Commander
8+
9+
Commander is a powerful Minecraft server plugin that gives you complete control over command visibility,
10+
permissions, and registration.
11+
Clean up your command list, enhance security, and customize your server's command experience.
12+
13+
## Features
14+
15+
### Command Management
16+
17+
- **Hide Commands**: Control which commands appear in tab completion
18+
- **Unregister Commands**: Completely remove commands from the server
19+
20+
### Permission Control
21+
22+
- **Override Permissions**: Set custom permissions on any command
23+
- **Query Permissions**: Check current permission settings
24+
- **Add Security**: Restrict commands that originally had no permissions
25+
26+
### Configuration
27+
28+
- **JSON Configuration**: Simple, human-readable configuration files
29+
- **Hot Reload**: Apply changes without server restart
30+
- **Manual Editing**: Direct configuration file access
31+
32+
## Quick Start
33+
34+
### Basic Usage
35+
36+
The main command of Commander is `/command` (or `/commandv` on the proxy),
37+
and requires the permission `commander.admin`:
38+
39+
```
40+
<gray># Hide commands from players</gray>
41+
/command hide <aqua>plugins</aqua>
42+
/command hide <aqua>pl</aqua>
43+
44+
<gray># Add permissions to unrestricted commands</gray>
45+
/command permission set <aqua>luckperms</aqua> <yellow>luckperms.use</yellow>
46+
47+
<gray># Remove dangerous commands entirely</gray>
48+
/command unregister <aqua>op</aqua>
49+
/command unregister <aqua>deop</aqua>
50+
51+
<gray># Save your changes</gray>
52+
/command save
53+
```
54+
55+
### Common Scenarios
56+
57+
#### Clean Command List
58+
59+
Hide administrative commands from regular players:
60+
```
61+
/command hide <aqua>plugins</aqua>
62+
/command hide <aqua>version</aqua>
63+
```
64+
65+
#### Security Hardening
66+
67+
Remove dangerous commands:
68+
```
69+
/command unregister <aqua>op</aqua>
70+
/command unregister <aqua>deop</aqua>
71+
```
72+
73+
#### Plugin Integration
74+
75+
Add permissions to plugin commands that lack them:
76+
```
77+
/command permission set <aqua>luckperms</aqua> <yellow>luckperms.use</yellow>
78+
/command permission set <aqua>eco</aqua> <yellow>economy.admin</yellow>
79+
```
80+
81+
## Permission System
82+
83+
### Required Permissions
84+
85+
- `commander.admin` - Access to all Commander commands
86+
- `commander.bypass` - See hidden commands (wildcard permissions ignored)
87+
88+
### Permission Override
89+
90+
Commander can override permissions on (almost) any command, even those from other plugins.
91+
This allows you to:
92+
- Add permissions to unrestricted commands
93+
- Change existing permissions
94+
- Create world-specific or group-specific command access
95+
96+
## Configuration Files
97+
98+
Commander stores settings in three JSON files:
99+
100+
- **`hidden-commands.json`** - List of hidden commands
101+
- **`unregistered-commands.json`** - List of unregistered commands
102+
- **`permission-overrides.json`** - Command permission overrides
103+
104+
## Use Cases
105+
106+
- Clean up command clutter for players
107+
- Remove dangerous commands like `/op` and `/deop`
108+
- Add security layers to plugin commands
109+
- Create context-specific command access

content/docs/commander/meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"index",
1414
"faq",
1515
"---Guide---",
16+
"hide-reveal",
17+
"unregister-register",
18+
"permissions",
19+
"reset",
20+
"reload-save",
1621
"---For Developers---",
1722
"api/repository",
1823
"api/index"

0 commit comments

Comments
 (0)