|
| 1 | +--- |
| 2 | +author: Jayly |
| 3 | +title: Configure Command Permissions on a Minecraft Bedrock Server (BDS) |
| 4 | +description: A practical guide to enabling, restricting, or completely disabling Minecraft Bedrock Dedicated Server (BDS) commands by editing the BDS config/commands.json file. |
| 5 | +--- |
| 6 | + |
| 7 | +# Configure Command Permissions on Minecraft Bedrock Dedicated Server |
| 8 | + |
| 9 | +Minecraft Bedrock Dedicated Server (BDS) lets you fine‑tune who can run which commands by editing a file named `commands.json` inside the server's `config/` folder. This guide shows how to (a) loosen access for trusted players, (b) lock sensitive commands to higher roles, or (c) effectively disable _all_ commands — even `/stop` — with one setting. |
| 10 | + |
| 11 | +> [!IMPORTANT] |
| 12 | +> This only applies to self‑hosted Bedrock Dedicated Servers. You cannot upload or use `config/commands.json` on Realms. |
| 13 | +
|
| 14 | +## File Location |
| 15 | + |
| 16 | +Inside your BDS directory: |
| 17 | + |
| 18 | +``` |
| 19 | +config/default/permissions.json |
| 20 | +config/commands.json |
| 21 | +bedrock_server.exe |
| 22 | +server.properties |
| 23 | +...other files |
| 24 | +``` |
| 25 | + |
| 26 | +If `config/commands.json` does not exist yet, you can create it manually (UTF-8, plain text). |
| 27 | + |
| 28 | +## Permission Levels |
| 29 | + |
| 30 | +Each command can be assigned a minimum role required to execute it. |
| 31 | + |
| 32 | +| Level | Meaning / Scope | Typical Use | |
| 33 | +| ---------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------------- | |
| 34 | +| `any` | Anyone (all connected players) | Allow benign utility commands (`list`, maybe `me`) | |
| 35 | +| `admin` | Players listed in `permissions.json` with role `admin` OR higher | Standard moderation (`kick`, `tp`, `gamemode`) | |
| 36 | +| `host` | Single local host player (used in some LAN/editor contexts) plus `owner` | Reserve for high-impact world state changes | |
| 37 | +| `owner` | Top server operator(s) only (role `owner` in `permissions.json`) | Critical operations (`stop`, `op`, structure or debug commands) | |
| 38 | +| `internal` | No one. Command is effectively disabled (hidden / blocked for all senders and console) | Disables a command for the world session. | |
| 39 | + |
| 40 | +> [!NOTE] |
| 41 | +> Setting a command (or the global default) to `internal` blocks _everyone_, including owners, from using it via chat or console. Use with caution, or keep a backup to revert. |
| 42 | +
|
| 43 | +## Basic Structure |
| 44 | + |
| 45 | +`commands.json` supports two top-level properties: |
| 46 | + |
| 47 | +```json |
| 48 | +{ |
| 49 | + "default_permission_level": "admin", |
| 50 | + "permission_levels": { |
| 51 | + "gamemode": "any" |
| 52 | + } |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +Explanation: |
| 57 | + |
| 58 | +- `default_permission_level`: Fallback applied to every command _not_ explicitly listed. |
| 59 | +- `permission_levels`: Object mapping individual command names (no leading slash) to a specific minimum level. |
| 60 | + |
| 61 | +Anything not overridden inherits the default. |
| 62 | + |
| 63 | +## Recommended Starting Point |
| 64 | + |
| 65 | +If you want a sane, moderately locked server: |
| 66 | + |
| 67 | +```json |
| 68 | +{ |
| 69 | + "default_permission_level": "admin", |
| 70 | + "permission_levels": { |
| 71 | + "list": "any", |
| 72 | + "me": "any", |
| 73 | + "say": "admin", |
| 74 | + "tell": "any", |
| 75 | + "op": "owner", |
| 76 | + "deop": "owner", |
| 77 | + "stop": "owner" |
| 78 | + } |
| 79 | +} |
| 80 | +``` |
| 81 | + |
| 82 | +## Selectively Tightening High‑Risk Commands |
| 83 | + |
| 84 | +You can progressively lock only the most dangerous ones while leaving utility commands open: |
| 85 | + |
| 86 | +```json |
| 87 | +{ |
| 88 | + "default_permission_level": "any", |
| 89 | + "permission_levels": { |
| 90 | + "gamemode": "admin", |
| 91 | + "give": "admin", |
| 92 | + "tp": "admin", |
| 93 | + "op": "owner", |
| 94 | + "deop": "owner", |
| 95 | + "stop": "owner" |
| 96 | + } |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +## Disabling Specific Commands |
| 101 | + |
| 102 | +Just mark a command as `internal`: |
| 103 | + |
| 104 | +```json |
| 105 | +{ |
| 106 | + "default_permission_level": "admin", |
| 107 | + "permission_levels": { |
| 108 | + "kick": "internal", |
| 109 | + "whitelist": "owner" |
| 110 | + } |
| 111 | +} |
| 112 | +``` |
| 113 | + |
| 114 | +Here `kick` becomes unusable for everyone; `whitelist` stays restricted to owners. |
| 115 | + |
| 116 | +## Disabling (Almost) All Commands |
| 117 | + |
| 118 | +Set the default to `internal` and then whitelist only the few you still want to function: |
| 119 | + |
| 120 | +```json |
| 121 | +{ |
| 122 | + "default_permission_level": "internal", |
| 123 | + "permission_levels": { |
| 124 | + "list": "any", |
| 125 | + "tell": "any" |
| 126 | + } |
| 127 | +} |
| 128 | +``` |
| 129 | + |
| 130 | +This permits only `/list` and `/tell`. Everything else (including `/stop`) is blocked. |
| 131 | + |
| 132 | +## Completely Lock Everything (Including /stop) |
| 133 | + |
| 134 | +If you want a "no commands at all" world (e.g., adventure map environment): |
| 135 | + |
| 136 | +```json |
| 137 | +{ |
| 138 | + "default_permission_level": "internal" |
| 139 | +} |
| 140 | +``` |
| 141 | + |
| 142 | +> [!IMPORTANT] |
| 143 | +> With this in place you cannot execute `/stop` from in‑game. You must terminate the server process from the host OS (e.g., closing the console window or killing the process) or restore a previous `commands.json`. |
| 144 | +
|
| 145 | +## Example Workflow |
| 146 | + |
| 147 | +1. Stop the server (`/stop` or close the console if still available). |
| 148 | +2. Open `config/commands.json` in Visual Studio Code. |
| 149 | +3. Adjust default and per‑command levels. |
| 150 | +4. Start the server and test with a player. |
0 commit comments