1.8.8 How to make particles visible to all players

Discussion in 'Spigot Plugin Development' started by TheUncleBartoDev, Mar 15, 2020.

Thread Status:
Not open for further replies.
  1. I use PacketPlayOutWorldParticles to send particles to the players since I'm at 1.8, what happens is that I want a player to create a particle explosion, the explosion happens well, only I want it to be seen for all online players so I did :
    Code (Text):


    PacketPlayOutWorldParticles packetFlame = new PacketPlayOutWorldParticles(EnumParticle.FLAME, true, (float) l1.getX(), (float) l1.getY(), (float) l1.getZ(), 0f, 0f, 0f, 0.1f, 5);


    for (Player onlineplayers: Bukkit.getOnlinePlayers ()) {
    ((CraftPlayer) onlineplayers) .getHandle (). PlayerConnection.sendPacket (packetFlame);
    }

     
    But then for some reason, when the player enters the server instead of the particles appearing in the zone where the player spawned, it appears in the zone where he disconnected the last time, try to remove the for (), then the particles would start to appear in the player's spawn zone, but they were not visible to all other players ....
     
Thread Status:
Not open for further replies.