# 🔒 TabCompleteFilter

It can be used to control which commands players can see, which groups can access certain completions, and whether some proxy-level commands should be denied completely.

***

### What It Does

The TabCompleteFilter module controls command visibility and command completion behavior on the proxy.

It can be used for:

* Hiding commands from tab completion
* Filtering command suggestions by group
* Filtering command suggestions by permission
* Blocking specific commands
* Denying proxy-level command execution
* Cleaning up the command list for players
* Preventing players from seeing internal staff or admin commands

***

### When To Enable It

Enable this module if you want to control what commands players can see when using tab completion.

This module is useful for:

* Public networks
* Networks with many plugins
* Staff-only commands
* Admin-only commands
* Cleaner player command lists
* Security-focused setups
* Networks that want to hide sensitive proxy commands

{% hint style="info" %}
This module does not replace permissions.

It helps control command visibility and filtering, but permissions should still be configured correctly with LuckPerms or your permission plugin.
{% endhint %}

***

### Requirements

The TabCompleteFilter module does not require external dependencies.

| Dependency     | Required | Purpose       |
| -------------- | -------- | ------------- |
| Redis          | No       | Not required. |
| MySQL          | No       | Not required. |
| MongoDB        | No       | Not required. |
| PacketEvents   | No       | Not required. |
| Discord        | No       | Not required. |
| PlaceholderAPI | No       | Not required. |

***

### Configuration File

The TabCompleteFilter module configuration file is located at:

```
plugins/NexusProxy/modules/tabcompletefilter/tabcompletefilter.yml
```

This file can contain settings for:

* Module status
* Filtered commands
* Hidden commands
* Blocked commands
* Group rules
* Group permissions
* Bypass permissions
* Proxy-level command denial
* Messages
* Command visibility behavior

***

### Default Commands

The TabCompleteFilter module does not provide a default player command.

It is controlled through its configuration file:

```
plugins/NexusProxy/modules/tabcompletefilter/tabcompletefilter.yml
```

***

### Permissions

| Permission                            | Description                                                            |
| ------------------------------------- | ---------------------------------------------------------------------- |
| `nexusproxy.tabcompletefilter.bypass` | Allows bypassing tab completion filtering, depending on configuration. |
| `groups.<group>.permission`           | Permission configured for a specific tab completion filter group.      |

{% hint style="warning" %}
Group permissions depend on your `tabcompletefilter.yml` configuration.

The exact permission names may be different on your setup.
{% endhint %}

***

### Recommended LuckPerms Setup

#### Staff bypass

```
/lp group staff permission set nexusproxy.tabcompletefilter.bypass true
```

#### Example group permission

```
/lp group vip permission set nexusproxy.tabcompletefilter.group.vip true
```

#### Example admin group permission

```
/lp group admin permission set nexusproxy.tabcompletefilter.group.admin true
```

{% hint style="info" %}
Use the real group permissions configured inside `tabcompletefilter.yml`.

The permissions above are examples.
{% endhint %}

***

### Command Filtering

Command filtering allows you to hide specific commands from tab completion.

Example concept:

```yaml
hidden_commands:
  - "/plugins"
  - "/pl"
  - "/version"
  - "/ver"
  - "/velocity"
```

This can help prevent players from seeing commands they should not use.

{% hint style="info" %}
Hiding commands from tab completion does not always mean the command is fully blocked.

Use deny or permission settings if you also want to prevent execution.
{% endhint %}

***

### Group-Based Filtering

The module can use groups to show different command completions to different players.

Example concept:

```yaml
groups:
  default:
    permission: "nexusproxy.tabcompletefilter.group.default"
    commands:
      - "/lobby"
      - "/msg"
      - "/reply"
      - "/friends"

  staff:
    permission: "nexusproxy.tabcompletefilter.group.staff"
    commands:
      - "/staffchat"
      - "/reports"
      - "/helpop"
      - "/maintenance"
```

This lets you create a cleaner command list for each group.

***

### Permission-Based Filtering

Each group can have its own permission.

Players only see the commands available for the group they match, depending on your configuration.

Example permission:

```
nexusproxy.tabcompletefilter.group.staff
```

This is useful for:

* Staff command visibility
* Donor command visibility
* Admin command visibility
* Rank-specific commands
* Cleaner tab completion per group

***

### Bypass Permission

Players with the bypass permission may ignore tab completion filtering, depending on configuration.

Bypass permission:

```
nexusproxy.tabcompletefilter.bypass
```

Recommended for:

* Owners
* Developers
* Administrators
* Senior staff

{% hint style="warning" %}
Do not give the bypass permission to normal players unless you want them to see unfiltered command completions.
{% endhint %}

***

### Denying Proxy-Level Commands

The TabCompleteFilter module can also deny proxy-level command execution, depending on configuration.

This can be useful for blocking commands such as:

```
/plugins
/pl
/version
/ver
/velocity
```

{% hint style="danger" %}
If you use deny rules, test them carefully.

Blocking the wrong command can affect staff tools or administration workflows.
{% endhint %}

***

### Common Use Cases

#### Hide plugin commands from players

Example concept:

```yaml
hidden_commands:
  - "/plugins"
  - "/pl"
  - "/version"
  - "/ver"
```

***

#### Give staff filter bypass

```
/lp group staff permission set nexusproxy.tabcompletefilter.bypass true
```

***

#### Create a default player command list

Example concept:

```yaml
groups:
  default:
    permission: "nexusproxy.tabcompletefilter.group.default"
    commands:
      - "/lobby"
      - "/hub"
      - "/msg"
      - "/reply"
      - "/ignore"
      - "/friends"
      - "/report"
```

***

#### Create a staff command list

Example concept:

```yaml
groups:
  staff:
    permission: "nexusproxy.tabcompletefilter.group.staff"
    commands:
      - "/staffchat"
      - "/adminchat"
      - "/reports"
      - "/helpop"
      - "/maintenance"
      - "/find"
```

***

### Setup Tips

* Use this module to clean up player tab completion.
* Do not rely only on hiding commands for security.
* Always configure permissions correctly with LuckPerms.
* Give bypass only to trusted staff or administrators.
* Keep the default group command list simple.
* Create separate groups for staff, donors, and admins if needed.
* Test tab completion with a normal player account.
* Test command execution separately if you use deny rules.
* Check `tabcompletefilter.yml` before changing group permissions or command lists.

***

### Common Issues

#### Commands still appear in tab completion

Check that:

* The TabCompleteFilter module is enabled.
* The command is included in the correct hidden or filtered list.
* The player does not have `nexusproxy.tabcompletefilter.bypass`.
* The player is not matching a group that allows the command.
* NexusProxy was reloaded or restarted after editing the config.

***

#### Players cannot see commands they should see

Check that:

* The command is included in their configured group.
* The player has the correct group permission.
* The group permission matches the value in `tabcompletefilter.yml`.
* The player does not match a more restrictive group.
* The command is not also included in a denied or hidden section.

***

#### Staff cannot see admin commands

Check that:

* Staff have the correct group permission.
* Staff have bypass permission if they should ignore all filters.
* The command is included in the staff or admin group.
* The command is not denied globally.

***

#### Command is hidden but still executable

This can happen if the command is only hidden from tab completion.

Check whether your configuration also denies execution.

{% hint style="info" %}
Tab completion filtering and command blocking are different behaviors.

Use deny settings if you want to prevent command execution.
{% endhint %}

***

#### A denied command breaks staff workflows

Check that:

* The command should actually be denied.
* Staff have bypass permission if needed.
* The command is not required by another plugin.
* The deny list does not include important administration commands by mistake.

***

### Summary

The TabCompleteFilter module helps control command visibility and command filtering on the proxy.

It is recommended for networks that want cleaner tab completion, group-based command visibility, hidden staff commands, or stricter control over proxy-level command access.


---

# 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://nexusproxy.nemesismc.net/modules/tabcompletefilter.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.
