Guys, I'm really curious to know how to make the status thing that was in the Hypixel lobby with current player amount and info, so I'm asking. Firstly, I asked people on Twitter if hey know how to do it, and then they said slapper but then they didn't say the command and how to make the live player status. I already know how to make the lines and everything else but I don't know how to center the words and how to make the live player status with saying like "there are 6 player online" and then when 2 more people join it will say "there are 8 players online". If you know how to do this with slapper please tell me. And by the way, if you know how to do it with another plugin then still let me know but make the documentation clear. Thank you, Epicrafter60 *picture below of what I mean for a clearer understanding of what I need
PHP: public function spawnParticle(PlayerJoinEvent $e) { $p=$e->getPlayer() $br = F::RESET. "\n"; $text[0] = F::BLUE. F::BOLD. "Server name example"; $text[1] = F::DARK_GREEN. "Welcome back, ".$p->getName(); $text[2] = F::DARK_GREEN. "Here is " .$this->getServer()->getOnlinePlayers(). " players online"; $text[3] = F::DARK_GREEN. "Some text"; $text[4] = F::DARK_GREEN. "Pikapikapikachu"; $level = $this->getServer()->getDefaultLevel(); $title = F::RESET. $text[0]. F::RESET; $texter = $text[1]. $br. $text[2]. $br. $text[3]. $br. $text[4]; $particle = new FloatingTextParticle(new Vector3(x, y, z), $texter, $title); $level->addParticle($particle, $p); } Somethink like this
Or use LiveSigns, there is a fixed version. I have a file that shows all players below each other, i could modify it.
$text is defined as F:ARK_GREEN etc, it dont needed defined like public/private $text; I have somethink like that and it works:
What is x, y, z? Are they variable or just normal x y z? Also, you forgot to define use pocketmine\level\particle\FloatingTextParticle; Please add all nessersary Stuffs in your code
X y z i did not defined, so he must write his xyz postions. I inserted here only a copy of my code, not full. He must understade it. FloatingTextParticle, Level, Vector3, Player and TextFormat is needed to make floating text particle.
PHP: use pocketmine\Player;use pocketmine\utils\TextFormat as F;use pocketmine\level\Level;use pocketmine\math\Vector3;use pocketmine\level\particles\FloatingTextParticle;
PHP: $level->addParticle(new FloatingTextParticle(new Vector3(-1, 40, -9),"",.$this->getServer()->getOnlinePlayers())); Code: Notice: Array to string conversion I do not understand