Why don't you use search? I hate it when people re-ask the same question over and over again. Anyways, there's a similar thread here: https://forums.pocketmine.net/threads/get-player-in-the-world.8510/
Learn to read the source code sometimes. https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/level/Level.php#L1865