I have no idea what is causing this error: PocketMine-MP Crash Dump Thu Jul 2 10:08:59 EDT 2015 Error: Call to a member function getName() on null File: /src/pocketmine/level/Level__64bit Line: 2634 Type: E_ERROR Code: [2625] return (int) $this->time; [2626] } [2627] [2628] /** [2629] * Returns the Level name [2630] * [2631] * @return string [2632] */ [2633] public function getName(){ [2634] return $this->provider->getName(); [2635] } [2636] [2637] /** [2638] * Returns the Level folder name [2639] * [2640] * @return string [2641] */ [2642] public function getFolderName(){ [2643] return $this->folderName; [2644] }
You have to call the getName function on a Level object. Try PHP: $this->getServer()->getLevelByName("name");
Just figured it out. I was trying to unload a level, but I ended up using a delayed task to do it which did the trick.
Bump. I'm getting the same error. Every time I try to unload a world, I get this error Code: [14:02:45] [Server thread/INFO]: Unloading level "kingoftheladder" Fatal error: Call to a member function getName() on null in phar://C:/Users/Jack/Desktop/Coding/POCKETMINE/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/level/Level__32bit.php on line 2634 What could be causing this?