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(252, 43, 120), "§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?
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 Spoiler: Preview gist here