menu
#4530869 Undefined index: shopPos

Submitted by PocketMine-MP 3.15.0

General information

Version: 3.15.0
Git commit: a498b041
Plugin involvement: Direct
Report date: 2020-09-16 00:40:20 +0000 UTC

System Information

PHP version: 7.3.21
Operating system: linux
System banner: Linux Shosting 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64

Error information

Warning: the BedWars plugin was directly involved in this crash. Please contact the plugin author.
Message: Undefined index: shopPos
File: plugins/BedWars_v1 (1).phar/src/BedWars/game/Game
Line: #336
Error level: ErrorException
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
            $position = new Position($vector->x, $vector->y, $vector->z,$this->plugin->getServer()->getLevelByName($this->worldName));

$this->generators[] = new Generator($item, $delay,$position, $spawnText, $spawnBlock);

}
}

private function initShops() : void{
foreach($this->teamInfo as $team => $info){
$shopPos = Utils::stringToVector(":", $info['shopPos']);
$rotation = explode(":", $info['shopPos']);

$nbt = Entity::createBaseNBT($shopPos->add(0.5, 0, 0.5), null, $rotation[3], $rotation[4]);
$entity = Entity::createEntity("Villager", $this->plugin->getServer()->getLevelByName($this->worldName), $nbt);
$entity->setNameTag(TextFormat::AQUA . "ITEM SHOP\n" . TextFormat::BOLD . TextFormat::YELLOW . "TAP TO USE");
$entity->setNameTagAlwaysVisible(true);
$entity->spawnToAll();

$this->npcs[$entity->getId()] = [$team, 'shop'];

#0 plugins/BedWars_v1 (1).phar/src/BedWars/game/Game(336): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[24] Undefined index: shopPos, string[71] phar:///root/pmmp/plugins/BedWars_v1 (1).phar/src/BedWars/game/Game.php, integer 336, array[7])
#1 plugins/BedWars_v1 (1).phar/src/BedWars/game/Game(305): BedWars\game\Game->initShops()
#2 plugins/BedWars_v1 (1).phar/src/BedWars/game/Game(622): BedWars\game\Game->start()
#3 plugins/BedWars_v1 (1).phar/src/BedWars/game/GameTick(24): BedWars\game\Game->tick()
#4 src/pocketmine/scheduler/TaskHandler(137): BedWars\game\GameTick->onRun(integer 4221)
#5 src/pocketmine/scheduler/TaskScheduler(179): pocketmine\scheduler\TaskHandler->run(integer 4221)
#6 src/pocketmine/plugin/PluginManager(654): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 4221)
#7 src/pocketmine/Server(2391): pocketmine\plugin\PluginManager->tickSchedulers(integer 4221)
#8 src/pocketmine/Server(2154): pocketmine\Server->tick()
#9 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#10 src/pocketmine/Server(1588): pocketmine\Server->start()
#11 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[11] /root/pmmp/, string[19] /root/pmmp/plugins/)
#12 src/pocketmine/PocketMine(304): pocketmine\server()
#13 (11): require(string[66] phar:///root/pmmp/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies