effect @ player location

Discussion in 'Spigot Plugin Development' started by Aspens, Jul 31, 2018.

  1. i've been trying to have smoke particles spawn @ a players location for 30 minutes now and nothing's been working for me

    Code (Text):
    w = hit.getWorld();
                w.playSound(hit.getLocation(), Sound.FIZZ, 5f, 5f);
                w.playSound(hit.getLocation(), Sound.FUSE, 5f, 5f);
                Bukkit.broadcastMessage(hit.getName() + " - hitter: " + hitter.getName());
             
                Location l = hit.getLocation();
                w.playEffect(l, Effect.SMOKE, 1);
    the #playEffect doesn't do anything and its definitely the correct player
    player#playEffect is deprecated and it also didn't work anyways
    (The #playSound works btw)
     
  2. Choco

    Moderator

    See World#spawnParticle(), Player#spawnParticle() and its various overloaded methods
     
    • Agree Agree x 1
  3. Player#spawnParticle is the method you searching for.
     
  4. I think that your code relates to sound effects and not particles
     
  5. iM ON paperspigot 1.7.10 so i dont have #spawnParticle
    even
    Code (Text):
    w.playEffect(l, Effect.SMOKE, 1);
    ?
     
    • Optimistic Optimistic x 1
  6. Choco

    Moderator

    Then I'm not sure many will be willing to help you. Your server version is far too out of date (4+ years) and we only support 1.12 and 1.13 as of currently. The most I'll tell you from here is to look into packets.

    http://www.howoldisminecraft1710.today/