# 💬 Messaging

It allows players to send private messages, reply to conversations, ignore other players, toggle private messages, and lets staff monitor messages through social spy.

***

### What It Does

The Messaging module adds proxy-side private communication tools.

It includes:

* Private messages
* Quick replies
* Ignore system
* Social spy
* Message toggle
* Optional cooldown bypass
* Optional staff hidden/bypass behavior
* Optional database-backed ignored players and message history, depending on your storage setup

***

### When To Enable It

Enable this module if you want NexusProxy to manage private messages across your Velocity network.

This module is recommended for most networks.

It is especially useful if you want:

* A centralized `/msg` system
* Staff monitoring through social spy
* Player ignore controls
* Message toggle controls
* Cross-server private messaging through the proxy

***

### Requirements

The Messaging module can work without external dependencies.

However, database storage may be useful depending on your configuration.

| Dependency     | Required | Purpose                                                                                            |
| -------------- | -------- | -------------------------------------------------------------------------------------------------- |
| Redis          | No       | Not required for basic private messaging.                                                          |
| MySQL          | Optional | Can be used for persistent ignored players or private message history, depending on configuration. |
| MongoDB        | Optional | Can be used for persistent ignored players or private message history, depending on configuration. |
| PacketEvents   | No       | Not required.                                                                                      |
| Discord        | No       | Not required.                                                                                      |
| PlaceholderAPI | No       | Not required.                                                                                      |

{% hint style="info" %}
If you want ignored players or message-related data to persist after restarts, configure MySQL or MongoDB in `nexusproxy.yml`.
{% endhint %}

***

### Configuration File

The Messaging module configuration file is located at:

```
plugins/NexusProxy/modules/messaging/messaging.yml
```

This file can contain settings for:

* Module status
* Command names
* Command aliases
* Permissions
* Messages
* Cooldowns
* Message formats
* Ignore behavior
* Social spy behavior
* Message toggle behavior
* Storage-related options

{% hint style="warning" %}
Command names and aliases may be configurable in the module file.

The commands shown here are the default commands.
{% endhint %}

***

### Default Commands

| Command                   | Description                                       |
| ------------------------- | ------------------------------------------------- |
| `/msg <player> <message>` | Sends a private message to a player.              |
| `/reply <message>`        | Replies to the last private message conversation. |
| `/ignore <player>`        | Ignores or unignores a player.                    |
| `/socialspy`              | Toggles social spy mode for staff.                |
| `/msgtoggle`              | Toggles receiving private messages.               |

***

### Permissions

| Permission                             | Description                                                                        |
| -------------------------------------- | ---------------------------------------------------------------------------------- |
| `nexusproxy.command.msg`               | Allows usage of `/msg`.                                                            |
| `nexusproxy.command.reply`             | Allows usage of `/reply`.                                                          |
| `nexusproxy.command.ignore`            | Allows usage of `/ignore`.                                                         |
| `nexusproxy.command.socialspy`         | Allows usage of `/socialspy`.                                                      |
| `nexusproxy.command.msgtoggle`         | Allows usage of `/msgtoggle`.                                                      |
| `nexusproxy.messaging.cooldown.bypass` | Allows bypassing messaging cooldowns, if enabled.                                  |
| `nexusproxy.staff.hidden`              | Allows staff hidden behavior, depending on configuration.                          |
| `nexusproxy.staff.bypass`              | Allows bypass behavior for staff-related restrictions, depending on configuration. |

***

### Recommended LuckPerms Setup

#### Default players

```
/lp group default permission set nexusproxy.command.msg true
/lp group default permission set nexusproxy.command.reply true
/lp group default permission set nexusproxy.command.ignore true
/lp group default permission set nexusproxy.command.msgtoggle true
```

#### Staff

```
/lp group staff permission set nexusproxy.command.socialspy true
/lp group staff permission set nexusproxy.staff.hidden true
/lp group staff permission set nexusproxy.staff.bypass true
```

#### Admins

```
/lp group admin permission set nexusproxy.messaging.cooldown.bypass true
```

{% hint style="warning" %}
Social spy should only be given to trusted staff members.

It allows staff to monitor private messages.
{% endhint %}

***

### Common Use Cases

#### Send a private message

```
/msg Steve Hello!
```

***

#### Reply to the last private message

```
/reply Sure, I can help you.
```

***

#### Ignore a player

```
/ignore Steve
```

***

#### Toggle private messages

```
/msgtoggle
```

***

#### Enable social spy

```
/socialspy
```

***

### Ignore System

The ignore system allows players to block private messages from specific players.

Depending on your storage configuration, ignored players may be stored persistently.

For persistent ignore data, configure database storage in:

```
plugins/NexusProxy/nexusproxy.yml
```

Supported database types include:

```yaml
mysql
mongodb
mongo
```

Use `none` if you do not need persistent storage.

***

### Social Spy

Social spy allows staff members to monitor private messages.

This is useful for moderation, abuse prevention, and staff oversight.

{% hint style="danger" %}
Only give social spy access to trusted staff.

This permission should not be given to normal players.
{% endhint %}

***

### Message Toggle

The `/msgtoggle` command allows players to enable or disable receiving private messages.

This is useful for players who do not want to receive direct messages from others.

Depending on your module configuration, staff members or bypass permissions may still be able to message toggled players.

***

### Cooldown Bypass

If the Messaging module uses cooldowns, the following permission can bypass them:

```
nexusproxy.messaging.cooldown.bypass
```

Recommended for:

* Admins
* Senior staff
* Console-like management roles

Not recommended for normal players.

***

### Setup Tips

* Give `/msg`, `/reply`, `/ignore`, and `/msgtoggle` to normal players.
* Give `/socialspy` only to trusted staff.
* Use database storage if you want ignored players or message data to persist.
* Check the module YAML file before changing command names or aliases.
* Review message formats to match your server style.
* Be careful with bypass permissions.

***

### Common Issues

#### Players cannot send private messages

Check that:

* The Messaging module is enabled.
* The player has `nexusproxy.command.msg`.
* The target player is online.
* The command name was not changed in `messaging.yml`.
* Another plugin is not overriding `/msg`.

***

#### `/reply` does not work

Check that:

* The player has `nexusproxy.command.reply`.
* The player has an active recent conversation.
* The Messaging module is enabled.
* The command was not renamed in the module configuration.

***

#### Ignore list does not persist after restart

Check that:

* Database storage is enabled.
* MySQL or MongoDB is configured correctly.
* `/nexusproxy storage` shows the database as connected.
* The Messaging module is configured to use persistent storage, if applicable.

***

#### Staff cannot use social spy

Check that:

* The staff member has `nexusproxy.command.socialspy`.
* The Messaging module is enabled.
* Social spy is not disabled in the module configuration.
* The command name was not changed.

***

#### Another plugin is using `/msg`

If another plugin registers the same command, change the command name or aliases in:

```
plugins/NexusProxy/modules/messaging/messaging.yml
```

***

### Summary

The Messaging module provides the core private messaging system for NexusProxy.

It is recommended for most networks and should usually be enabled if you want proxy-side private messages, replies, ignore controls, message toggles, and staff social spy.


---

# 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/messaging.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.
