Skip to content

Commit 241f232

Browse files
authored
Merge pull request #135 from TheNextLvl-net/docs/commander
commander docs
2 parents 3e22688 + dcf1cb7 commit 241f232

File tree

7 files changed

+667
-1
lines changed

7 files changed

+667
-1
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Command Visibility
3+
description: Control command visibility in tab completion
4+
---
5+
6+
# Hiding and Revealing Commands
7+
8+
Hiding commands allows you to control which commands appear in tab completion,
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.
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+
<Callout type="warning">
35+
Using `/command hide "*"` will hide literally **ALL** commands, including `/command` itself.
36+
Use `/command reveal "*"` to quickly restore all hidden commands.
37+
</Callout>
38+
39+
### Reveal a Command
40+
Usage: `/command reveal <command>`
41+
Makes a previously hidden command visible again in tab completions.
42+
43+
**Examples:**
44+
```
45+
<gray># Reveal specific commands</gray>
46+
/command reveal <aqua>plugins</aqua>
47+
/command reveal <aqua>pl</aqua>
48+
49+
<gray># Reveal all hidden commands</gray>
50+
/command reveal <aqua>"*"</aqua>
51+
52+
<gray># Reveal all bukkit namespaced commands</gray>
53+
/command reveal <aqua>"bukkit:*"</aqua>
54+
55+
<gray># Reveal all namespaced commands</gray>
56+
/command reveal <aqua>"*:*"</aqua>
57+
```
58+
59+
## Bypass Permission
60+
Players with the `commander.bypass` permission can see all hidden commands.
61+
62+
<Callout type="info">
63+
Wildcard permissions (like `*`) are ignored for the bypass permission.
64+
Players must have the explicit `commander.bypass` permission to see hidden commands.
65+
</Callout>
66+
67+
## Use Cases
68+
69+
### Clean Command Lists
70+
Hide administrative or utility commands that regular players shouldn't see:
71+
```
72+
/command hide <aqua>plugins</aqua>
73+
/command hide <aqua>pl</aqua>
74+
/command hide <aqua>version</aqua>
75+
/command hide <aqua>ver</aqua>
76+
```
77+
78+
### Server-Specific Commands
79+
Hide commands that are only relevant to certain server types or gamemodes.
80+
81+
### Development Commands
82+
Hide debugging or development commands from production environments.
83+
84+
## Configuration
85+
86+
Hidden commands are stored in a JSON configuration file.
87+
The file contains a simple array of command names that should be hidden.
88+
89+
`hidden-commands.json`:
90+
```json
91+
[
92+
"plugins",
93+
"pl",
94+
"version",
95+
"ver"
96+
]
97+
```
98+
99+
## Tips
100+
101+
- Commands are hidden without the `/` prefix in the configuration
102+
- Both the full command name and aliases should be hidden if desired
103+
- Use `/command reload` to reload the configuration if manually edited

content/docs/commander/index.mdx

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,123 @@ 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 (not required)</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+
## Wildcard Support
97+
98+
Commander supports powerful wildcard patterns for bulk operations on commands:
99+
100+
### Wildcard Patterns
101+
102+
- `*` - Matches any command name
103+
- `*:*` - Matches any namespaced command (commands with colons)
104+
- `prefix:*` - Matches all commands with a specific namespace prefix
105+
- `*suffix` - Matches all commands ending with a specific suffix
106+
107+
<Callout type="warning">
108+
Wildcard operations affect many commands at once.
109+
Test carefully and consider using `/command save` before bulk operations.
110+
_To restore from a saved configuration, use `/command reload`._
111+
</Callout>
112+
113+
## Configuration Files
114+
115+
Commander stores settings in three JSON files:
116+
117+
- **`hidden-commands.json`** - List of hidden commands
118+
- **`unregistered-commands.json`** - List of unregistered commands
119+
- **`permission-overrides.json`** - Command permission overrides
120+
121+
## Use Cases
122+
123+
- Clean up command clutter for players
124+
- Remove dangerous commands like `/op` and `/deop`
125+
- Add security layers to plugin commands
126+
- 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)