Sending custom packet

Discussion in 'Plugin Development' started by Eternalis, Jul 22, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Eternalis

    Hello,
    I want to send custom packet with craftbukkit, just basic packet like

    Packet999 add_skills_point = new Packet999("agility", int x);
    Player.sendMyPacket(add_skills_point);

    And i prefer to use a plugin to receive / send packets, i have look and found the following methods but it won't work (in bukkit API 1.5.1) :

    ((CraftPlayer)player).getHandle().playerConnection.sendPacket(packet);

    Or this code but it won't work :C

    If you have any idea to how to create, send and receive packet with Bukkit, i will offer you a free cookie x) !

    PS : I can mod the Client, the Craftbukkit Server and create plugin.

    Thanks.

    (I'm french, sorry :oops: )
     
  2. Offline

    Necrodoom

    moved to plugin development.
     
  3. First of all if you are messing with packets you should use ProtocolLib to avoid interfearance with other plugins. An example of how to send a packet is provided in the forum thread.
    Second: One does not just create a new packet. One shall use the 0xFA Packet ( plugin channel ).
     
Thread Status:
Not open for further replies.

Share This Page