The error is on line 287 Any solution? Crash dump Date of Crash Fri Dec 25 2015 Error E_ERROR - Call to a member function getFolderName() on null Code: phar_LastPlayerPE-master_rxuTzLkdolGTd1j.phar/src/LastPlayer/Main.php Hide error code 278 break; 279 } 280 return true; 281 } 282 283 public function onPlayerRespawn(PlayerRespawnEvent $event){ 284 $player = $event->getPlayer(); 285 if($this->config->exists("lastpos")) 286 { 287 if($player->getLevel()->getFolderName()==$this->level->getFolderName()) 288 { 289 $v3=$this->signlevel->getSpawnLocation(); 290 $event->setRespawnPosition(new Position($v3->x,$v3->y,$v3->z,$this->signlevel)); 291 } 292 } 293 unset($event,$player); 294 } 295 296 public function onPlace(BlockPlaceEvent $event) 297 { Crashing plugin LastPlayer-Hybrid Line 287 is causing it, what can I change in that line to fix this problem!? My head is confused right now.
Lol I don't know how to define it, I purchased this plugin from a guy for like 5$ and he doesn't wanna reply, so I am looking for help
this is all off topic -- $5 for a crashing plugin? I can fix it or even make a new one for FREE. What is it about though? If you want PM me.
Look what I found: http://forums.pocketmine.net/threads/minigame-issue-again.14092/#post-138984 The crash log is exactly like the one in this thread, and it's posted by the exact same user! Wait! Is this a duplicated thread? And why not tell us the name of the author of this $5 plugin ripoff? That would help us a lot!
The reason I paid 5$ is because there wasn't any working Hunger Games or I didn't even find a single plugin of that, I got frustrated and paid someone for a working plugin, the beginning worked but whenever I leaved the server, it crashed...
Noone can help you here with just that little code snippet. To resolve the error, we need the whole plugin code. If you don't want to post it here, just PM it to me. EDIT: Looks like you got scammed, the plugin is available for free on GitHub lmao, it would be the best to tell us the username of the seller. Add this to config.yml PHP: level: YourLevelName Replace YourLevelName with the name of your HG level And edit the line 287 to following: PHP: if($player->getLevel()->getFolderName()==$this->config->get->"YourLevelName") Replace YourLevelName again. Now that error should be fixed.
Are you sure? Did it work for you when you changed? And wtf, so he didn't make the plugin? -_- Feel scammed.
Thank you! That code clearly solved my problem, by the way this doesnt work: if($player->getLevel()->getFolderName()==$this->config->get->"YourLevelName") but this does: if($player->getLevel()->getFolderName()==$this->config->get("YourLevelName"))