menu
#2907487 Call to a member function getSpawnLocation() on null

Submitted by PocketMine-MP 3.9.6+dev.1777

General information

Version: 3.9.6+dev.1777
Git commit: 247875e3
Plugin involvement: Direct
Report date: 2019-10-10 00:19:59 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: linux
System banner: Linux nchosting 4.4.0-164-generic #192-Ubuntu SMP Fri Sep 13 12:02:50 UTC 2019 x86_64

Error information

Warning: the EggWars_PO plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getSpawnLocation() on null
File: plugins/EggWars.phar/src/Playek/EW/Main
Line: #139
Error level: Error
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
		$cfg = $this->newConfig("config");
if($arena->status == 0 or $arena->status == 1){
$lobbyName = $cfg->get("lobby");
if($lobbyName != null){
if(file_exists($this->getServer()->getDataPath() . "worlds/". $lobbyName)){
$lobby = $this->getServer()->getLevelByName($lobbyName);
if(!$lobbyName instanceof Level){
$this->getServer()->loadLevel($lobbyName);
}
$p->teleport($lobby->getSpawnLocation(),0,0);
$p->getInventory()->clearAll();
$p->getArmorInventory()->clearAll();
$p->setScale(1.0);
$p->sendMessage($this->prefix."You have joined the game ID ".$arena->id);
}
}
}
}

public function anotherGame(): void {
#0 plugins/EggWars.phar/src/Playek/EW/task/SearchArena(26): Playek\EW\Main->joinArena(object pocketmine\Player, object Playek\EW\Arena)
#1 src/pocketmine/scheduler/TaskHandler(159): Playek\EW\task\SearchArena->onRun(integer 1057)
#2 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 1057)
#3 src/pocketmine/plugin/PluginManager(681): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 1057)
#4 src/pocketmine/Server(2570): pocketmine\plugin\PluginManager->tickSchedulers(integer 1057)
#5 src/pocketmine/Server(2346): pocketmine\Server->tick()
#6 src/pocketmine/Server(2206): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1784): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[43] /home/minecraft/multicraft/servers/server1/, string[51] /home/minecraft/multicraft/servers/server1/plugins/)
#9 src/pocketmine/PocketMine(299): pocketmine\server()
#10 (1): require(string[88] phar:///home/minecraft/multicraft/jar/Pocketmine-1.12.phar/src/pocketmine/Pocket)

Loaded Plugins

  • Show

Server Settings

  • Show