you know, theres a magical search form provided above the website that can be used to find something thats already answered or that existed.
PHP: <?phpnamespace spocket\mel;use pocketmine\event\Listener;use pocketmine\event\player\PlayerJoinEvent;use pocketmine\level\particle\FloatingTextParticle;use pocketmine\math\Vector3;use pocketmine\plugin\PluginBase;use pocketmine\utils\TextFormat;class Main extends PluginBase implements Listener{ public $var; public function onEnable(){ $this->var = 0; $this->getServer()->getPluginManager()->registerEvents($this, $this); } public function onJoin(PlayerJoinEvent $event ) { if($this->var == 0) { $level1 = "world"; $level = $this->getServer()->getLevelByName($level1); $pos = new Vector3(127, 43, 128); $pos1 = new Vector3(127, 44, 133); $pos2 = new Vector3(122, 44, 128); $pos3 = new Vector3(132, 44, 128); $pos4 = new Vector3(127, 44, 123); $level->addParticle(new FloatingTextParticle($pos->add(0.5, 0.0, 0.5),"", "§cS§6P§eO§aC§bK§9E§dT §espk.ddns.net §d19132")); $level->addParticle(new FloatingTextParticle($pos1->add(0.5, 0.0, 0.5),"", "SURVIVAL SERVER")); $level->addParticle(new FloatingTextParticle($pos2->add(0.5, 0.0, 0.5),"", "MINIGAME SERVER")); $level->addParticle(new FloatingTextParticle($pos3->add(0.5, 0.0, 0.5),"", "SPOCKET SERVER")); $level->addParticle(new FloatingTextParticle($pos4->add(0.5, 0.0, 0.5),"", "?????")); $this->var = 1; } else { //do nothing } }}
PHP: public function onJoin(PlayerJoinEvent) { $level = $this->getLevelByName("world"); $level->addParticle(new FloatingTextParticle(0.5, 5.5, 0.5, "", TextFormat::BOLD . "Floating Text!"));} Next time look at other Threads, there are far too many threads about TextParticles already.