Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I can't find solution!

Comments in 'Plugin Development' started by SoThatsTheRules, Dec 29, 2015.

  1. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    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.
  2. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    So what I am gonna change the line 287 to .-.?
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Not probably - That's it! xD You just have to define it, lol.
  4. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    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 :p
  5. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    Srsly don't blame me for not coding this plugin -_-
  6. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
    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.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Stop duplicating threads.
  8. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    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!
  9. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    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...
  10. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    Go PM Give me the plugin
    I remove the problem you.
  11. myst02
    Offline

    myst02 Active Member

    Joined:
    Mar 23, 2015
    Posts:
    97
    Minecraft User:
    myst02
    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:
     levelYourLevelName 
    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.
    Last edited: Dec 30, 2015
    SoThatsTheRules likes this.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Lesson: never buy a plugin from anyone. The end.
    PocketKiller and CraftYourBukkit like this.
  13. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    Ah hell naw Imma ask for refund from paypal.
  14. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    Are you sure? Did it work for you when you changed? And wtf, so he didn't make the plugin? -_- Feel scammed.
  15. SoThatsTheRules
    Offline

    SoThatsTheRules New Member

    Joined:
    Dec 11, 2015
    Posts:
    11
    Minecraft User:
    SoThatsTheRules
    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"))

Share This Page

Advertisement