Package com.kraken.api.core.packet
Class PacketClient
- java.lang.Object
-
- com.kraken.api.core.packet.PacketClient
-
@Singleton public class PacketClient extends java.lang.ObjectPacketClientis an instance-based RuneLite client packet sending utility which uses reflection to construct and send low level packets directly to the game servers. Generally you should not use this class directly as it functions at a low level when sending packets.Instead, it's recommended to use the higher level API's like
MousePackets,WidgetPackets, orNpcPacketsfor sending game packets to the server based on your specific entity interaction needs (clicking interfaces, NPC's, GameObjects, etc...
-
-
Constructor Summary
Constructors Constructor Description PacketClient(net.runelite.api.Client client)Creates a new PacketSender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsendPacket(PacketDefinition def, java.lang.Object... objects)Constructs and sends a packet to the game server.
-
-
-
Constructor Detail
-
PacketClient
@Inject public PacketClient(net.runelite.api.Client client)
Creates a new PacketSender. This constructor initializes packet queueing functionality by either loading the client packet sending method from the cached json file or running an analysis on the RuneLite injected client to determine the packet sending method.- Parameters:
client- The RuneLite Client instance.
-
-
Method Detail
-
sendPacket
public void sendPacket(PacketDefinition def, java.lang.Object... objects)
Constructs and sends a packet to the game server. This is the primary public method of this class.- Parameters:
def- ThePacketDefinitionenumeration defining the packet structure.objects- The data (payload) for the packet, in the order defined by the PacketDefinition.
-
-