OMG READ THE DOCS. $player->getLevel() returns a LEVEL OBJECT. Then in the Level class it says getName(). So: $player->getLevel()->getName();. Using var_dump() can also simply show you the problem. var_dump($event->getPlayer()->getLevel()); will return a Level object -_- *sweaty-facepalm*
This method doesn't require a parameter, as it already returns a Level instance(of the player that joined). But if you want to get another Level instance, you would need to use Server->getLevelByName(), which will return a Level instance on success and null on failure. You should actually explain to him how it works, he doesn't understand right now.
From $event->getPlayer()->getLevel() you'll get Level object that player is currently in. In docs its said that Level object contains method called getName(). So you can use it like this. PHP: $levelName = $event->getPlayer()->getLevel()->getName();var_dump($levelName); Code: string(5) => 'world' To see what else you can get out of Level object see here: http://jenkins.pocketmine.net/job/P...3/d4b/classpocketmine_1_1level_1_1_level.html although it's from API 1.12.0 but it's almost/completly the same with API 1.13.0