This code doesn't work PHP: public function onPlayerEvents(\pocketmine\event\player\PlayerEvent $ev){if($ev instanceof PlayerJoinEvent){$ev->getPlayer()->sendMessage(' test ');}}
Because it doesn't have a handler list Just do: PHP: public function onPlayerJoin(\pocketmine\event\player\PlayerJoinEvent $event) { $event->getPlayer()->sendMessage("test");}
how is this helping? who knows what OP wanted to do, op just want an explanation and that's all what if OP want to log all player events? so is registering every single event "easier"?
OP; Original poster normally used in threads implying the person who created the thread without mentioning or saying op's name never to be confused with OP; [Server] Operator normally used to imply people in/have control of the said server/network