Solved Packets

Discussion in 'Plugin Development' started by Konkz, Mar 17, 2014.

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

    Konkz

    Hey,

    I've been looking around a bit but could not find any thread that could help me out. I found some that offer me things that I will be able to use but that's only when I have accomplished the first step, which is understanding the packets.

    I basically want to send lava particles (dripping ones) to players location that last for 3 seconds.
    I tried to do some research on this but I could not find anything that I can understand.

    Any help or links to threads that may help me will be appreciated, thanks!
     
  2. Offline

    Bammerbom

    Konkz I think lava particles (dripping) are client
     
  3. Offline

    Desle

  4. Offline

    Konkz


    I worded myself wrong, when I said 3 seconds I meant literally 3 seconds as that's how long they last (About) from what I've seen.

    Also, thank you for the link but how would I go about actually spawning them?

    Jhtzb - you can send packets for the client to receive to make them spawn. Seen it done. :)
     
  5. Offline

    Desle

    Konkz

    Code:java
    1. public void dripLava(Location location, int offset, int id, int amount) {
    2. PacketPlayOutWorldParticles dripLava = new PacketPlayOutWorldParticles("dripLava", (float) location.getX(), (float) location.getY(), (float) location.getZ(), offset, offset, offset, id, amount);
    3. for (Player player : Bukkit.getOnlinePlayers())
    4. ((CraftPlayer) player).getHandle().playerConnection.sendPacket(dripLava);
    5. }
     
  6. Offline

    Konkz


    Is there a possibility that you could explain it in more detail so I can customize it if I need to in future and so I get a deeper understanding.

    If it's fine by you, would it be possible for you to add me on Skype?
     
  7. Offline

    Desle

    Konkz

    All it does is look through the online players (for (... : Bukkit.getOnlinePlayers())) and it will send them the packet dripLava, created above. To know what you have to fill in where, you can use the link I gave you to the wiki.
    And sorry no, I don't really use skype.
     
Thread Status:
Not open for further replies.

Share This Page