Hello I would like to know how added the name a player in a sentence ? Exemple : $sender->sendMessage("Hello name");
PHP: public function onJoin(PlayerJoinEven $event): void{$player = $event->getPlayer();$name = $player->getName();$player->sendMessage("Hello there, $name"); //send message to player only$player->sendPopup("Hello there, $name"); //send tip message to player only$player->addTitle("Hello there", $name); //send title and subtitle to player only$this->getServer()->broadcastMessage("$name has joined"); //send message to everyone in server$this->getServer()->broadcastPopup("$name has joined"); //send tip message to everyone in server$this->getServer()->broadcastTitle("Hello there", $name); //send title and subtitle to everyone in server}