So, this is my function: PHP: public function onJoin(PlayerJoinEvent $event){ $player = $event->getPlayer(); $name = $player->getName(); if($player->hasPlayedBefore() == true){ $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . "======================="); $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . " Welcome back to " . TextFormat::AQUA . "Sky" . TextFormat::WHITE . "line" . TextFormat::GOLD . ", " . TextFormat::WHITE . $name . TextFormat::GOLD . "!"); $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . "======================="); } else { $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . "======================="); $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . " Welcome to " . TextFormat::AQUA . "Sky" . TextFormat::WHITE . "line" . TextFormat::GOLD . ", " . TextFormat::WHITE . $name . TextFormat::GOLD . "!"); $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . " Since this is your first time here, we recommend reading the rules of the server!"); $player->sendMessage(TextFormat::BOLD . TextFormat::GOLD . "======================="); } } I thought that would work, but for some reason it didn't do anything... Can anyone help me? Thanks!
Did you forget to register your event listener? (btw if (sth == true) { do stuff } is kinda stupid most of the time, because you already have a boolean right there, just use if (sth) { do stuff })
No problem, not registering the listener is probably the top PMMP pluhin development mistake that even pros make haha