# Anti Command Prefix

## About this module

The Anti Command Prefix module prevents players using prefixed commands to get around filters and discover potential sensitive server information like the plugins. Ex. /minecraft:me instead of /me.

This module does not require "process-commands" in the main config to be enabled to function.&#x20;

Optionally integrates with the Command Spy module; when a command is modified/a prefix is removed, it will appear crossed out in the command spy notification.

{% hint style="info" %}
This module works by modifying command contents after they're sent by players. Ex. "/essentials:msg" will run without the prefix ("/msg")
{% endhint %}

{% hint style="info" %}
To bypass this module, op or the permission: "**chatsentry.anticommandprefix.bypass**" is required.
{% endhint %}

## Config guide

You can access the below settings in the **anti-command-prefix.yml** file within the **modules** folder of the plugin's root folder.

{% hint style="success" %}
**Config excerpts taken from v3.6.0 and may not be completely up-to-date with the latest changes. To see the most up-to-date file, see below:**
{% endhint %}

{% content-ref url="/pages/-MOrlhPLaqIZzjXUmSMx" %}
[anti-command-prefix.yml](/files/files/module-configurations/anti-command-prefix.yml.md)
{% endcontent-ref %}

###

### allowed-prefixed-commands&#xD;

Command exemption list: commands below will be allowed to be ran with their prefix.

*Set to "allowed-prefixed-commands: \[]" to have an empty list.*

```yaml
allowed-prefixed-commands:
  - "/plugin:command"
  - "/plugin2:command"
```

### allowed-global-prefixes

Prefix exemption list: prefixes below will be allowed to be ran no matter the command.

*Set to "allowed-global-prefixes: \[]" to have an empty list.*

```yaml
allowed-global-prefixes:
  - "plugin:"
  - "plugin2:"
```

### send-msg-when-modified

Should the module send the message (changeable via lang.yml) notifying the player their command was modified when it removes a disallowed prefix?

```yaml
send-msg-when-modified: true
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.chatsentry.xyz/config-guides/module-config-guides/anti-command-prefix.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
