> For the complete documentation index, see [llms.txt](https://hcore.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hcore.gitbook.io/wiki/messaging/packets.md).

# Packets

## HCore#sendPacket(player, packet)

Will send provided packet to player.

## Handling packets

&#x20;Example packet handling method's code:

```java
@EventHandler
public void onPacketEvent(@Nonnull PacketEvent event) {
    PacketPlayInAbilities packet = event.getPacket(); // gets packet as template
    System.out.println(packet.a()); // prints "a" method in PacketPlayInAbilities.
}
```
