Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to remove particles

Comments in 'Plugin Development' started by CaptainKenji17, Feb 18, 2016.

  1. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    So I just have a code that spawns a FloatingTextParticle by command

    and on first command
    PHP:
                        $level $this->getServer()->getLevelByName("world");
                        
    $x 252;
                        
    $y 43;
                        
    $z 120;
                        
    $hmm = new Position($x$y$z$level);
                        
    $hmm = new FloatingTextParticle(new Vector3(25243120), "§ePlaying now: " $this->songs[$this->index][self::NAME]);
                        
    $level->addParticle($hmm);
    second is the same too so when I type the second command it just replaces the text so it kinda rude, how do I remove the first command particle after doing the second command?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    In your code, lines 2-5 are completely useless.

    This snippet demonstrates how to spawn a different-for-each-player particle that can change through a command.

    Gist link

Share This Page

Advertisement