I create a FloatingTextParticle and create 2 FloatingTextParticle and fost FloatingTextParticle closed, please help.
PHP: $pas = new FloatingTextParticle(new Vector3($x, $y + 2, $z), "", "§fВсе команды сервера"); $this->getServer()->getDefaultLevel()->addParticle($pas, [$p]); $pas1 = new FloatingTextParticle(new Vector3($x, $y + 1.75, $z), "", "§fБесплатный питомец §a/pets get wizer"); $this->getServer()->getDefaultLevel()->addParticle($pas1, [$p]); $pas2 = new FloatingTextParticle(new Vector3($x, $y + 1.50, $z), "", "§fБанк §a/bank"); $this->getServer()->getDefaultLevel()->addParticle($pas2, [$p]);
i dont know why this dont work but you can use this PHP: $level->addParticle(new FloatingTextParticle(new Vector3(157.5505, 66.8, 122.4863), "", C::GREEN ."text"), [$event->getPlayer()]);
Plugin development is not a process of sharing code snippets. Please don't blindly share people the code snippets you got to copy and paste into your plugins.
When i join was created text3. $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 2, 128), "", "text"), [$e->getPlayer()]); $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.75, 128), "", "text2"), [$e->getPlayer()]); $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.50, 128), "", "text3"), [$e->getPlayer()]);
Please use [php][/php] tags to enclose your code. Also, I wonder if your floating text particles are show properly if the X coordinate is a bit different (like 1 block horizontal difference each)?
When i join was created text3. $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 2, 128), "", "text"), [$e->getPlayer()]); $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.75, 128), "", "text2"), [$e->getPlayer()]); $this->getServer()->getDefaultLevel()->addParticle(new FloatingTextParticle(new Vector3(128, 5 + 1.50, 128), "", "text3"), [$e->getPlayer()]);