It returns null. x) Compile the last github PocketMine version, I think that it's fixed now. If it is not, maybe you can try to fix the bug by yourself, it will help you to improve in code and solve your problem by yourself.