Please READ the pocketmine API, it's really simple, or take a look at https://docs.pockemtine.net, you're spamming with tons of questions that you can resolve by yourself, please make a RESEARCH, not a search. Hint: src/pocketmine/level/Level.php
Search. Edit: And with the betas released, you don't need to tag your threads with [NEW API] anymore.