Particle Effect

Discussion in 'Plugin Development' started by FireBuster12, Jun 28, 2017.

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

    FireBuster12

    Hello Bukkit,

    I have a code that if you fly that he then runs a particle effect.
    Only that particle effect does not entirely good.

    I have a different server the right, like I want:

    [​IMG]

    My code:
    Code:java
    1.  
    2. public void Check()
    3. {
    4. Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable()
    5. {
    6. public void run()
    7. {
    8. for (Player p : Bukkit.getOnlinePlayers() ) {
    9. if ((p.isFlying()) && (p.hasPermission("ParticleFly.fly")))
    10. {
    11. Location loc = p.getLocation();
    12.  
    13.  
    14. p.getWorld().playEffect(loc, Effect.CLOUD, 500);
    15. }
    16. }
    17. }
    18. }, 2 * 20, 0);
    19. }
    20.  

    How do I make it exactly the same as on the image?
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    FireBuster12

    My code what i have:
    Code:java
    1.  
    2. public void Check()
    3. {
    4. Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable()
    5. {
    6. public void run()
    7. {
    8. for (Player p : Bukkit.getOnlinePlayers() ) {
    9. if ((p.isFlying()) && (p.hasPermission("ParticleFly.fly")))
    10. {
    11. Location loc = p.getLocation();
    12.  
    13.  
    14. p.getWorld().playEffect(loc, Effect.CLOUD, 500);
    15. }
    16. }
    17. }
    18. }, 2 * 20, 0);
    19. }
    20.  
     
  4. Online

    timtower Administrator Administrator Moderator

    @FireBuster12 And a screenshot of the effect with this code?
     
  5. Offline

    FireBuster12

  6. Offline

    Plugers11

    Cuz basic cloud particles have their velocity. Maybe try putting 1 particle, or spawn them in some random locations like 0-0.5 block away from player
     
  7. Offline

    FireBuster12

    And how can i do that? Can you show me?
     
  8. Online

    timtower Administrator Administrator Moderator

  9. Offline

    FireBuster12

    Yes the other I do not get to talking
     
  10. Offline

    Plugers11

    Try spawning 1 particle and check if there will be any sense of doing random spawning. [not exploding particle]
     
Thread Status:
Not open for further replies.

Share This Page