PacketAPI is a resource for sending, receiving or modifying network packets.
PacketAPI is an open source project that sending, receiving or modifying network packets. Easy and flexible to use with efficient API Developer.
- Modifies the values for sending packages.
- Modifies the values for receiving packages.
- Java 8
- Netty 4.1.68
- Spigot API 1.8
- Spigot (1.8.x)
package io.github.epicgo.packet;
public static class PacketExampleListener implements PacketEventListener {
@PacketEventHandler(listenType = PacketWrapperType.PacketPlayInCustomPayload)
public void onReceive(final PacketReceiveEvent event) {
final PacketWrapper packetWrapper = event.getPacketWrapper();
final String packetName = packetWrapper.getName();
System.out.println("Packet -> " + packetName);
System.out.println("Player Channel -> " + packetWrapper.get("a"));
System.out.println("Player Packet Data Channel -> " + packetWrapper.get("b"));
}
}