# 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.
}
```
