1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

help

Discussion in 'Development' started by Levi, Sep 17, 2017.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    ERror
    Code:
    16.09 20:06:34 [Server] Server thread/CRITICAL Error: "Call to a member function setComponents() on null" (EXCEPTION) in "src/pocketmine/entity/Entity" at line 1854
    16.09 20:06:34 [Server] Server thread/CRITICAL Could not pass event 'pocketmine\event\player\PlayerPreLoginEvent' to 'AlwaysSpawn v1.0.0': Call to a member function setComponents() on null on Plugin\Main
    PHP:
    public function onLogin(PlayerPreLoginEvent $e){
            
    $player $e->getPlayer();
            
    $player->teleport($this->getServer()->getDefaultLevel()->getSpawnLocation());
        }
     
  2. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    fixed.. changed PlayerPreLoginEvent to just PlayerLoginEvent
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.