# 📦 PacketEvents

It is not required for every setup, but it is required if you want to use modules or features that depend on packet handling.

***

### What Is PacketEvents Used For?

NexusProxy can use PacketEvents for packet-level features such as:

* HealthIndicator
* Toast announcements
* Toast donation notifications
* Packet-based integrations
* Signed or packet-based visual features, depending on configuration

{% hint style="warning" %}
PacketEvents is required for HealthIndicator and toast-based features.

If PacketEvents is not installed, those features will not work correctly.
{% endhint %}

***

### When Should You Install PacketEvents?

Install PacketEvents if you plan to use:

* HealthIndicator
* Announcer toast messages
* Donations toast effects
* Any packet-based feature mentioned in a module configuration

You do not need PacketEvents if you only use basic modules such as:

* Main
* Messaging
* Lobby
* Staff
* MOTD
* Maintenance
* Friends
* Report
* Custom Commands
* Queue
* Ping

{% hint style="info" %}
If you are not using packet-based features, PacketEvents may not be required.
{% endhint %}

***

### Download

You can download PacketEvents here:

[PacketEvents on Modrinth](https://modrinth.com/plugin/packetevents)

***

### Installation Location

PacketEvents must be installed on the Velocity proxy.

Example:

```
velocity/
└── plugins/
    ├── NexusProxy-x.x.x.jar
    └── packetevents-velocity-x.x.x.jar
```

{% hint style="warning" %}
Install the Velocity version of PacketEvents on the Velocity proxy.

Do not install the wrong platform version.
{% endhint %}

***

### Installation Steps

#### Step 1: Stop the proxy

Stop your Velocity proxy completely before installing PacketEvents.

***

#### Step 2: Download PacketEvents

Download the correct PacketEvents build for Velocity.

***

#### Step 3: Place the jar in the plugins folder

Place the PacketEvents jar inside:

```
velocity/plugins/
```

Example:

```
velocity/plugins/packetevents-velocity-x.x.x.jar
```

***

#### Step 4: Start the proxy

Start the Velocity proxy.

Check the console to confirm PacketEvents loaded correctly.

***

#### Step 5: Enable packet-based NexusProxy features

After PacketEvents is installed, enable the NexusProxy modules or features that require it.

Examples:

```
plugins/NexusProxy/modules/healthindicator/healthindicator.yml
```

```
plugins/NexusProxy/modules/announcer/announcer.yml
```

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

***

### Modules That Use PacketEvents

| Module          | PacketEvents Usage                                         |
| --------------- | ---------------------------------------------------------- |
| HealthIndicator | Required for health, absorption, and XP metadata handling. |
| Announcer       | Required for toast announcements.                          |
| Donations       | Required for toast donation effects.                       |

***

### HealthIndicator

The HealthIndicator module requires PacketEvents.

Without PacketEvents, HealthIndicator cannot handle packet-based metadata features.

Used for:

* Hiding player health
* Spoofing player health
* Hiding or modifying absorption metadata
* Hiding or modifying XP metadata

{% hint style="danger" %}
Do not enable HealthIndicator unless PacketEvents is installed and loaded correctly.
{% endhint %}

***

### Toast Announcements

The Announcer module can use toast announcements.

Toast announcements require PacketEvents.

Example concept:

```yaml
announcements:
  reward:
    type: "toast"
    title: "&6Reward"
    description: "&fClaim your daily reward!"
```

If PacketEvents is missing, toast announcements may fail or be skipped depending on configuration.

***

### Donation Toast Effects

The Donations module can use toast notifications for donation events.

Toast effects require PacketEvents.

Example concept:

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

***

### Checking If PacketEvents Loaded

After starting the proxy, check your console logs.

You should see PacketEvents loading successfully.

You can also check your Velocity plugin list if available.

If PacketEvents fails to load, fix that before enabling packet-based NexusProxy modules.

***

### Recommended Setup

For a network using HealthIndicator and toast features:

```
velocity/
└── plugins/
    ├── NexusProxy-x.x.x.jar
    └── packetevents-velocity-x.x.x.jar
```

Then enable only the packet-based features you need.

Recommended order:

1. Install PacketEvents.
2. Start the proxy.
3. Confirm PacketEvents loaded correctly.
4. Enable HealthIndicator or toast features.
5. Restart or reload NexusProxy.
6. Test with a normal player account.

***

### Common Issues

#### HealthIndicator does not work

Check that:

* PacketEvents is installed on the Velocity proxy.
* The PacketEvents jar is the correct Velocity version.
* PacketEvents loaded correctly on startup.
* The HealthIndicator module is enabled.
* NexusProxy was restarted after installing PacketEvents.
* The player does not have a bypass permission if they should be affected.

***

#### Toast announcements do not work

Check that:

* PacketEvents is installed.
* PacketEvents loaded correctly.
* The Announcer module is enabled.
* The announcement type is configured as toast.
* Toast settings are valid.
* The proxy was restarted after installing PacketEvents.

***

#### Donation toast effects do not work

Check that:

* PacketEvents is installed.
* PacketEvents loaded correctly.
* The Donations module is enabled.
* Toast effects are enabled in `donations.yml`.
* The donation event is triggering correctly.
* The proxy was restarted after installing PacketEvents.

***

#### PacketEvents does not load

Check that:

* You downloaded the correct platform build.
* The jar is inside the Velocity `plugins` folder.
* There are no duplicate PacketEvents jars.
* The PacketEvents version is compatible with your proxy setup.
* The proxy was fully restarted.
* Console logs do not show dependency or startup errors.

***

#### Console shows packet-related errors

Check that:

* PacketEvents is installed correctly.
* NexusProxy and PacketEvents are both updated to compatible versions.
* The affected packet-based feature is configured correctly.
* You are not using duplicate or outdated PacketEvents jars.
* The error is not caused by another packet-handling plugin.

***

### Setup Tips

* Install PacketEvents only if you need packet-based features.
* Use the Velocity version of PacketEvents.
* Restart the proxy after installing PacketEvents.
* Do not enable HealthIndicator before PacketEvents is working.
* Test toast announcements before using them publicly.
* Keep PacketEvents updated when updating NexusProxy.
* Check console logs after every update.
* Avoid duplicate PacketEvents jars.

***

### Summary

PacketEvents is optional for NexusProxy, but required for packet-based features.

Install it if you want to use HealthIndicator, toast announcements, donation toast effects, or other packet-based integrations.


---

# 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/integrations/packetevents.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.
