Skip to content
Hakan Kargın edited this page Apr 19, 2022 · 5 revisions

How To Use

Packet System

You can easily send packets to specific players or listen packets.

Examples

How to send a packet to player

HCore.sendPacket(player, new PacketPlayOutArmAnimation());

HCore.sendPacket(player, new PacketPlayInAdvancements());

How to listen of any packet.

@EventHandler
public void onPacketEvent(@Nonnull PacketEvent event) {
    PacketPlayInAbilities packet = event.getPacket();
    System.out.println(packet.a());
}
Clone this wiki locally