# 💎 Donations

It can be used for manual donation announcements, store integration workflows, Discord notifications, toast effects, GG wave messages, commands, and optional Redis synchronization.

***

### What It Does

The Donations module provides a configurable donation broadcast system.

It can be used for:

* Manual donation broadcasts
* Store-related donation notifications
* Network-wide donation messages
* Discord donation logging
* Toast donation notifications
* GG wave messages
* Command actions after donations
* Test donation broadcasts
* Optional Redis replication across multiple proxies

***

### When To Enable It

Enable this module if your network has a store, donation system, supporter ranks, or wants to announce purchases and contributions.

This module is useful for:

* Store purchases
* Rank purchases
* Cosmetic purchases
* Donation announcements
* Community supporter messages
* Donation effects
* Discord donation logs
* Cross-proxy donation broadcasts

***

### Requirements

The Donations module can work without external dependencies.

Some features may require optional integrations.

| Dependency       | Required           | Purpose                                                         |
| ---------------- | ------------------ | --------------------------------------------------------------- |
| Redis            | Optional           | Can replicate donation events across multiple Velocity proxies. |
| MySQL            | No                 | Not required.                                                   |
| MongoDB          | No                 | Not required.                                                   |
| PacketEvents     | Required for toast | Needed if using toast donation notifications.                   |
| Discord Webhooks | Optional           | Can send donation messages or embeds to Discord.                |
| PlaceholderAPI   | No                 | Not required.                                                   |

{% hint style="warning" %}
PacketEvents is required if you use toast-based donation effects.
{% endhint %}

{% hint style="info" %}
Redis is recommended for multi-proxy networks if donation broadcasts should appear across all proxies.
{% endhint %}

***

### Configuration File

The Donations module configuration file is located at:

```
plugins/NexusProxy/modules/donations/donations.yml
```

This file can contain settings for:

* Module status
* Command names
* Command aliases
* Permissions
* Broadcast formats
* Donation message formats
* Discord webhook settings
* Toast settings
* GG wave settings
* Command actions
* Redis synchronization
* Test broadcast 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                                |
| ---------------------- | ------------------------------------------ |
| `/donations status`    | Shows the current Donations module status. |
| `/donations broadcast` | Sends a manual donation broadcast.         |
| `/donations test`      | Sends a test donation broadcast.           |
| `/donationbroadcast`   | Alias for donation broadcast features.     |
| `/dnotify`             | Alias for donation notification features.  |

***

### Permissions

| Permission                               | Description                                  |
| ---------------------------------------- | -------------------------------------------- |
| `nexusproxy.command.donations`           | Allows access to the main donations command. |
| `nexusproxy.command.donations.status`    | Allows usage of `/donations status`.         |
| `nexusproxy.command.donations.broadcast` | Allows usage of `/donations broadcast`.      |
| `nexusproxy.command.donations.test`      | Allows usage of `/donations test`.           |

***

### Recommended LuckPerms Setup

#### Admin

```
/lp group admin permission set nexusproxy.command.donations true
/lp group admin permission set nexusproxy.command.donations.status true
/lp group admin permission set nexusproxy.command.donations.broadcast true
/lp group admin permission set nexusproxy.command.donations.test true
```

{% hint style="warning" %}
Donation broadcast permissions should only be given to trusted administrators.

These commands can send public messages across the network.
{% endhint %}

***

### Donation Broadcasts

Donation broadcasts are public messages sent when a donation or store-related event happens.

They can be used to announce:

* Player donations
* Rank purchases
* Store purchases
* Supporter rewards
* Special contribution messages

Example concept:

```yaml
broadcast:
  enabled: true
  messages:
    - "&6&lDONATION &8» &f%player% purchased &e%package%&f!"
    - "&7Thank you for supporting the server!"
```

{% hint style="info" %}
Available placeholders depend on your donation configuration and implementation.
{% endhint %}

***

### Manual Broadcasts

The Donations module supports manual donation broadcasts.

Default command:

```
/donations broadcast
```

This can be useful if your store integration triggers commands manually or if staff need to announce a donation event.

Example concept:

```
/donations broadcast Steve VIP
```

{% hint style="info" %}
The exact command arguments depend on your module configuration.
{% endhint %}

***

### Test Broadcasts

You can use the test command to verify donation messages, effects, Discord webhooks, and command actions.

Default command:

```
/donations test
```

Use this before enabling donation broadcasts in production.

***

### Discord Webhooks

The Donations module can optionally send donation messages to Discord through webhooks.

This can be used for:

* Donation logs
* Store purchase logs
* Public donation channels
* Staff donation monitoring
* Supporter announcements

Example concept:

```yaml
discord:
  enabled: true
  webhook_url: "https://discord.com/api/webhooks/..."
```

{% hint style="warning" %}
Keep Discord webhook URLs private.

Anyone with the webhook URL may be able to send messages to that Discord channel.
{% endhint %}

***

### Toast Notifications

The Donations module can show toast notifications for donation events, depending on configuration.

{% hint style="warning" %}
Toast notifications require PacketEvents installed on the Velocity proxy.
{% endhint %}

Toast notifications are useful for:

* Purchase celebrations
* Supporter rewards
* Special announcements
* Clean visual donation effects

Example concept:

```yaml
toast:
  enabled: true
  title: "&6Donation"
  description: "&f%player% supported the server!"
```

***

### GG Wave

GG wave allows players to react to a donation event by sending a configured message such as `gg`.

This can help create community interaction around donations.

Example concept:

```yaml
gg_wave:
  enabled: true
  message: "gg"
  duration: 15
```

Use this feature carefully so it feels fun and not spammy.

***

### Command Actions

The Donations module can run configured commands when a donation broadcast is triggered.

This can be used for:

* Giving rewards
* Running effects
* Sending additional messages
* Triggering other plugin commands
* Logging donation events

Example concept:

```yaml
commands:
  - "alert %player% supported the server!"
```

{% hint style="danger" %}
Only configure trusted commands.

Donation command actions can affect players, rewards, or the whole network.
{% endhint %}

***

### Redis Synchronization

Redis can replicate donation events across multiple Velocity proxies.

This is useful when your network has more than one proxy and donation broadcasts should appear everywhere.

{% hint style="info" %}
For multi-proxy networks, make sure every proxy uses the same Redis settings and each proxy has a unique `cluster.proxy_id`.
{% endhint %}

***

### Common Use Cases

#### Check donation module status

```
/donations status
```

***

#### Send a manual donation broadcast

```
/donations broadcast
```

***

#### Send a test donation broadcast

```
/donations test
```

***

#### Use aliases

```
/donationbroadcast
```

```
/dnotify
```

***

### Setup Tips

* Configure donation messages before enabling public broadcasts.
* Use `/donations test` before going live.
* Use Discord webhooks if you want donation logs in Discord.
* Install PacketEvents before using toast effects.
* Use Redis if donation broadcasts should sync across multiple proxies.
* Keep webhook URLs private.
* Review command actions carefully before enabling them.
* Give donation command permissions only to trusted administrators.
* Check `donations.yml` if you want to change command names or aliases.

***

### Common Issues

#### Donation broadcast does not send

Check that:

* The Donations module is enabled.
* The command sender has the correct permission.
* The broadcast format is configured correctly.
* NexusProxy was reloaded or restarted after editing the config.
* Another plugin is not overriding the command.

***

#### Discord donation message does not send

Check that:

* Discord webhook support is enabled.
* The webhook URL is correct.
* The webhook still exists in Discord.
* The proxy can reach Discord.
* The donation event is configured to send Discord messages.

***

#### Toast notification does not work

Check that:

* PacketEvents is installed on the Velocity proxy.
* PacketEvents is loaded correctly.
* Toast notifications are enabled in `donations.yml`.
* The proxy was restarted after installing PacketEvents.
* The toast configuration is valid.

***

#### Donation broadcast does not sync across proxies

Check that:

* Redis is enabled.
* All proxies use the same Redis settings.
* All proxies use the same `channel_prefix`.
* Every proxy has a unique `cluster.proxy_id`.
* Redis synchronization is enabled for donation events, if configurable.
* `/nexusproxy storage` shows Redis as connected.

***

#### GG wave does not work

Check that:

* GG wave is enabled.
* The donation event triggered correctly.
* The configured duration is valid.
* Players have access to send the configured GG message if permissions are required.
* Another chat plugin is not blocking the message.

***

#### Commands do not execute

Check that:

* Command actions are enabled.
* The commands are written correctly.
* Placeholders are valid.
* The command source has permission if required.
* The target player or package value exists.

***

### Summary

The Donations module provides donation broadcast tools for NexusProxy.

It is recommended for networks that want store purchase announcements, Discord donation logs, toast effects, GG wave interaction, command actions, or cross-proxy donation synchronization.


---

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